Welcome Guest ( Log In | Register )

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


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:

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

  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);

  // Src versus Dest issue
  char sHost[AC_BUFFER_SIZE];
  char dHost[AC_BUFFER_SIZE];
  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:
ac_getDestHost returned:

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

Posts in this topic

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