Forum OpenACS Q&A: Problem compiling nsjabber: conference_jclient error

Hello

I'm trying to compile nsjabber with my aolserver4 installation and these errors occurs compiling conference_jclient.c:

<<<<

conference_jclient.c
In file included from ../include/xode/../jabber/lib_jclient.h:41,
                from conference_jclient.c:41:
../include/xode/../jabber/jabber.h:214: warning: `NS_VERSION' redefined
../../include/ns.h:45: warning: this is the location of the previous definition conference_jclient.c: In function `Jb_GetUserIdFromJid':
conference_jclient.c:177: parse error before `int'
conference_jclient.c: In function `Jb_Get_Room_Creation_Xml': conference_jclient.c:352: warning: unused variable `cache'
conference_jclient.c:355: warning: `error' might be used uninitialized in this function
conference_jclient.c: In function `Jb_Create_Room_Server': conference_jclient.c:396: warning: passing arg 3 of `xmlnode_insert_cdata' as unsigned due to prototype
conference_jclient.c:396: warning: negative integer implicitly converted to unsigned type
conference_jclient.c:399: warning: passing arg 3 of `xmlnode_insert_cdata' as unsigned due to prototype
conference_jclient.c:399: warning: negative integer implicitly converted to unsigned type
conference_jclient.c:400: warning: passing arg 3 of `xmlnode_insert_cdata' as unsigned due to prototype
conference_jclient.c:400: warning: negative integer
implicitly converted to unsigned type
conference_jclient.c:385: warning: `error' might be used uninitialized in this function conference_jclient.c: In function `Jb_ConferenceIq':
conference_jclient.c:919: warning: unused variable `counter2'
conference_jclient.c: In function `Jb_SendConferenceInvite': conference_jclient.c:1386: warning: passing arg 3 of `xmlnode_insert_cdata' as unsigned due to prototype
conference_jclient.c:1386: warning: negative integer implicitly converted to unsigned type
conference_jclient.c:1388: warning: passing arg 3 of `xmlnode_insert_cdata' as unsigned due to prototype conference_jclient.c:1388: warning: negative integer implicitly converted to unsigned type
conference_jclient.c:1389: warning: passing arg 3 of `xmlnode_insert_cdata' as unsigned due to prototype
conference_jclient.c:1389: warning: negative integer implicitly converted to unsigned type
make: *** [conference_jclient.o] Error 1

<<<<<

I revised this forum thread and follow sugestions made by all of you but still not have success.

Does anybody know where I'm failing?

My environment:

- gcc version 2.95.4 20011002 (Debian prerelease)
- nsjabber-0.1.0.2.tar.gz from https://openacs.org/storage/download/index?version_id=187508
- aolserver4

** nsjabber compiles fine if I comment conference_jclient in Makefile but in this case  aolserver complains by missing COMMUNITY_NICKNAME from nsjabber module and stop loading.

Thanks

Orzenil

I'm very sorry people. New post above was to be a reply in the following thead https://openacs.org/forums/message-view?message_id=156852

By the way, object conference_jclient now compiles fine. I just comment the dummy variable in the line 177 in conference_jclient.c as

char* Jb_GetUserIdFromJid(jid id)
{
char* sql = NULL;
char* user_id = NULL;
pool p = NULL;
int count = 0;

p = pool_heap(500);
Ns_Log(Debug ,"Jb_GetUserIdFromJid %d , id = %s " , count++ , jid_full(id) );
if(p == NULL || id == NULL)return NULL;
Ns_Log(Debug ,"Jb_GetUserIdFromJid %d " , count++ );
id->resource = NULL;
Ns_Log(Debug ,"Jb_GetUserIdFromJid %d " , count++ );
sql = pmalloc(p , (sizeof(char) * 300));
Ns_Log(Debug ,"Jb_GetUserIdFromJid %d " , count++ );
snprintf(sql , 501 ,"Select (jb_get_user_id('%s')) as user_id FROM dual" , id->user);
//*********************************************sql-block**********************************************************************{
Ns_DbHandle *handle;
Ns_Set *row;
handle = Ns_DbPoolGetHandle("jabber");

//int dummy; <<< commented out

Ns_Log(Debug ,"Jb_GetUserIdFromJid %d " , count++ );
if(handle) {
Now it works!