Welcome Guest ( Log In | Register )

> ac_getSrcPort returns same value as ac_getDestPort?
jdh
post Mar 24 2010, 12:30 AM
Post #1


Newbie
*

Group: Members
Posts: 7
Joined: 20-February 10
Member No.: 842



Serge, now that getting a long playlist works I have noticed one oddity wih ac_getSrcPort and ac_getDestPort, and possibly also ac_getSrcHost and ac_getDestHost.

I modified getplaylist.cpp as follows to demonstrate my problem:
CODE

  // Here we should have a playlist
  char title[AC_BUFFER_SIZE];

  EnterCriticalSection(&cs_list);
  int size = ac_get_plsize();
  for (int i = 0; i < size; i++) {
    memset(title, 0, AC_BUFFER_SIZE);
    if (ac_get_title(i, title)) {
      printf("%s\n", title);
    }
  }
  LeaveCriticalSection(&cs_list);

  // Src versus Dest issue
  char sHost[AC_BUFFER_SIZE];
  char dHost[AC_BUFFER_SIZE];
  ac_getSrcHost(sHost);
  ac_getDestHost(dHost);
  printf("\nac_getSrcPort returned: %d\n", ac_getSrcPort());
  printf("ac_getDestPort returned: %d\n", ac_getDestPort());
  printf("ac_getSrcHost returned: %s\n", sHost);
  printf("ac_getDestHost returned: %s\n", dHost);

  ac_remove_event_listener(SERVER_HOST, SERVER_PORT);


As mention in ac.h ac_getSrcPort should return 60334 and ac_getDestPort should return 60333, However running getplaylist (after the playlist listing) I get:

ac_getSrcPort returned: 60333
ac_getDestPort returned: 60333
ac_getSrcHost returned: 127.0.0.1
ac_getDestHost returned: 127.0.0.1

Any idea why both Src and Dest are the same?

Sorry about this, but I promise this is the only other issue I've found sad.gif

Thanks, Jdh
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
 
Reply to this topicStart new topic
Replies(1 - 2)
Serge
post Mar 24 2010, 01:20 AM
Post #2


AMIP Developer
***

Group: Root Admin
Posts: 935
Joined: 12-March 06
Member No.: 1



These functions return values from the ac.ini. If there is no ac.ini, then default values are returned. Default values are the same and are hardcoded.

So the problem is that ac.ini is missing.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
jdh
post Mar 26 2010, 10:52 PM
Post #3


Newbie
*

Group: Members
Posts: 7
Joined: 20-February 10
Member No.: 842



QUOTE(Serge @ Mar 23 2010, 08:20 PM) *

These functions return values from the ac.ini. If there is no ac.ini, then default values are returned. Default values are the same and are hardcoded.

So the problem is that ac.ini is missing.


Thanks Serge, forgot about the ac.ini it's probably not there. Or at the very least not setup correctly!

Thanks again, Jdh
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
44 User(s) are reading this topic (44 Guests and 0 Anonymous Users)
0 Members: