Commit 4fcdcaeb authored by 's avatar
Browse files

git-svn-id: file:///home/svn/mapi/trunk@575 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 856cbf2a
#include "vod.h"
int main(int argc, char **argv)
{
int _sock;
struct sockaddr_un remote;
auth_msg_t buffer;
_sock = socket(PF_UNIX, SOCK_STREAM, 0);
remote.sun_family=PF_UNIX;
memcpy(remote.sun_path, VODSOCKGLOBAL, strlen(VODSOCKGLOBAL));
connect(_sock, &remote, strlen(VODSOCKGLOBAL)+sizeof(remote.sun_family));
memset(&buffer, 0, sizeof(auth_msg_t));
buffer.opcode = 0x16;
strncpy(buffer.username, "gvasil", strlen("gvasil"));
strncpy(buffer.password, "gvasil", strlen("gvasil"));
strncpy(buffer.vo, "CSD", strlen("CSD"));
send(_sock, &buffer, sizeof(auth_msg_t), 0);
return(0);
}
......@@ -678,7 +678,7 @@ failure: data->opcode = NIC_NOTFOUND;
while(temp)
{
//strncpy(s, temp->data, strlen(temp->data));
snprintf(s, MAX_DATA_SIZE, "%s", temp->data);
snprintf(s, MAX_DATA_SIZE, "%s", (char *)temp->data);
s += strlen(temp->data);
*s++ = ':';
if(s > data->vo)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment