ac_getSrcPort returns same value as ac_getDestPort? |
ac_getSrcPort returns same value as ac_getDestPort? |
jdh |
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 Thanks, Jdh |
Serge |
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. |