git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1767 689a6050-402a-0410-94f2-e92a70836424
... | ... |
@@ -45,16 +45,16 @@ int parse_cluster_cfg() |
45 | 45 |
while (*p!=' ' && *p!='\t' && *p!='[' && *p!=0) |
46 | 46 |
p++; |
47 | 47 |
if ( p==start || *p==0 ){ |
48 |
- SLOG(L_ERR,"ERROR: cluster names must only contain alphanumeric chars\n"); |
|
48 |
+ LOG(L_ERR,"ERROR: cluster names must only contain alphanumeric chars\n"); |
|
49 | 49 |
goto error; |
50 | 50 |
} |
51 | 51 |
if (!((*entry)=(struct as_entry*)shm_malloc(sizeof(struct as_entry)))) { |
52 |
- SLOG(L_ERR,"Out of shm mem for as_entry\n"); |
|
52 |
+ LOG(L_ERR,"Out of shm mem for as_entry\n"); |
|
53 | 53 |
goto error; |
54 | 54 |
} |
55 | 55 |
memset(*entry,0,sizeof(struct as_entry)); |
56 | 56 |
if (!((*entry)->name.s=shm_malloc(p-start))) { |
57 |
- SLOG(L_ERR,"Out of shm malloc for cluster name\n"); |
|
57 |
+ LOG(L_ERR,"Out of shm malloc for cluster name\n"); |
|
58 | 58 |
goto error; |
59 | 59 |
} |
60 | 60 |
memcpy((*entry)->name.s, start, p-start); |
... | ... |
@@ -65,7 +65,7 @@ int parse_cluster_cfg() |
65 | 65 |
/*get as names*/ |
66 | 66 |
eat_spaces(p); |
67 | 67 |
if (*p!='['){ |
68 |
- SLOG(L_ERR,"Malformed cluster cfg string %s\n",cluster_cfg); |
|
68 |
+ LOG(L_ERR,"Malformed cluster cfg string %s\n",cluster_cfg); |
|
69 | 69 |
goto error; |
70 | 70 |
} |
71 | 71 |
p++; |
... | ... |
@@ -79,14 +79,14 @@ int parse_cluster_cfg() |
79 | 79 |
if ( p==start || *p==0 ) |
80 | 80 |
goto error; |
81 | 81 |
if (!((*entry)->u.cs.as_names[n].s=shm_malloc(p-start))) { |
82 |
- SLOG(L_ERR,"Out of shm_mem for AS name in cluster\n"); |
|
82 |
+ LOG(L_ERR,"Out of shm_mem for AS name in cluster\n"); |
|
83 | 83 |
goto error; |
84 | 84 |
} |
85 | 85 |
(*entry)->u.cs.as_names[n].len=p-start; |
86 | 86 |
memcpy((*entry)->u.cs.as_names[n].s,start,p-start); |
87 | 87 |
n++; |
88 | 88 |
if(n>=MAX_AS_PER_CLUSTER){ |
89 |
- SLOG(L_ERR,"ERROR: too many AS per cluster\n"); |
|
89 |
+ LOG(L_ERR,"ERROR: too many AS per cluster\n"); |
|
90 | 90 |
goto error; |
91 | 91 |
} |
92 | 92 |
eat_spaces(p); |
... | ... |
@@ -105,16 +105,16 @@ int parse_cluster_cfg() |
105 | 105 |
entry=&((*entry)->next); |
106 | 106 |
} |
107 | 107 |
for (tmp=as_list;tmp->next;tmp=tmp->next){ |
108 |
- SLOG(L_DBG,"%.*s\n",tmp->name.len,tmp->name.s); |
|
108 |
+ LOG(L_DBG,"%.*s\n",tmp->name.len,tmp->name.s); |
|
109 | 109 |
} |
110 |
- SLOG(L_DBG,"%.*s\n",tmp->name.len,tmp->name.s); |
|
110 |
+ LOG(L_DBG,"%.*s\n",tmp->name.len,tmp->name.s); |
|
111 | 111 |
entry=&(tmp->next); |
112 | 112 |
for(tmp=as_list;tmp;tmp=tmp->next){ |
113 | 113 |
if (tmp->type!=CLUSTER_TYPE) |
114 | 114 |
continue; |
115 |
- SLOG(L_DBG,"cluster:[%.*s]\n",tmp->name.len,tmp->name.s); |
|
115 |
+ LOG(L_DBG,"cluster:[%.*s]\n",tmp->name.len,tmp->name.s); |
|
116 | 116 |
for(k=0;k<tmp->u.cs.num;k++){ |
117 |
- SLOG(L_DBG,"\tAS:[%.*s]\n",tmp->u.cs.as_names[k].len,tmp->u.cs.as_names[k].s); |
|
117 |
+ LOG(L_DBG,"\tAS:[%.*s]\n",tmp->u.cs.as_names[k].len,tmp->u.cs.as_names[k].s); |
|
118 | 118 |
for (tmp2=as_list;tmp2;tmp2=tmp2->next) { |
119 | 119 |
if (tmp2->type== AS_TYPE && tmp->u.cs.as_names[k].len == tmp2->name.len && |
120 | 120 |
!memcmp(tmp->u.cs.as_names[k].s,tmp2->name.s,tmp2->name.len)) { |
... | ... |
@@ -125,13 +125,13 @@ int parse_cluster_cfg() |
125 | 125 |
if(tmp2) |
126 | 126 |
continue; |
127 | 127 |
if (!((*entry)=shm_malloc(sizeof(struct as_entry)))) { |
128 |
- SLOG(L_ERR,"ERROR:Out of shm mem \n"); |
|
128 |
+ LOG(L_ERR,"ERROR:Out of shm mem \n"); |
|
129 | 129 |
goto error; |
130 | 130 |
} |
131 | 131 |
memset(*entry,0,sizeof(struct as_entry)); |
132 | 132 |
(*entry)->type=AS_TYPE; |
133 | 133 |
if (!((*entry)->name.s=shm_malloc(tmp->u.cs.as_names[k].len))) { |
134 |
- SLOG(L_ERR,"ERROR:out of shm mem\n"); |
|
134 |
+ LOG(L_ERR,"ERROR:out of shm mem\n"); |
|
135 | 135 |
goto error; |
136 | 136 |
} |
137 | 137 |
memcpy((*entry)->name.s,tmp->u.cs.as_names[k].s,tmp->u.cs.as_names[k].len); |
... | ... |
@@ -142,7 +142,7 @@ int parse_cluster_cfg() |
142 | 142 |
} |
143 | 143 |
} |
144 | 144 |
for(tmp=as_list;tmp;tmp=tmp->next){ |
145 |
- SLOG(L_DBG,"%.*s %s",tmp->name.len,tmp->name.s,tmp->next?"":"\n"); |
|
145 |
+ LOG(L_DBG,"%.*s %s",tmp->name.len,tmp->name.s,tmp->next?"":"\n"); |
|
146 | 146 |
} |
147 | 147 |
return 1; |
148 | 148 |
error: |
... | ... |
@@ -57,7 +57,7 @@ int encode_contact_body(char *hdr,int hdrlen,contact_body_t *contact_parsed,unsi |
57 | 57 |
} |
58 | 58 |
for(contact_offset=0,i=0,mycontact=contact_parsed->contacts;mycontact;mycontact=mycontact->next,i++){ |
59 | 59 |
if((k=encode_contact(hdr,hdrlen,mycontact,&tmp[contact_offset]))<0){ |
60 |
- SLOG(L_ERR,"parsing contact number %d\n",i); |
|
60 |
+ LOG(L_ERR,"parsing contact number %d\n",i); |
|
61 | 61 |
return -1; |
62 | 62 |
} |
63 | 63 |
where[2+i]=k; |
... | ... |
@@ -120,11 +120,11 @@ int encode_contact(char *hdrstart,int hdrlen,contact_t *body,unsigned char *wher |
120 | 120 |
} |
121 | 121 |
|
122 | 122 |
if (parse_uri(body->uri.s, body->uri.len,&puri) < 0 ) { |
123 |
- SLOG(L_ERR, "Bad URI in address\n"); |
|
123 |
+ LOG(L_ERR, "Bad URI in address\n"); |
|
124 | 124 |
return -1; |
125 | 125 |
}else{ |
126 | 126 |
if((j=encode_uri2(hdrstart,hdrlen,body->uri,&puri,&where[i]))<0){ |
127 |
- SLOG(L_ERR, "error codifying the URI\n"); |
|
127 |
+ LOG(L_ERR, "error codifying the URI\n"); |
|
128 | 128 |
return -1; |
129 | 129 |
}else{ |
130 | 130 |
i+=j; |
... | ... |
@@ -155,7 +155,7 @@ int print_encoded_contact_body(int fd,char *hdr,int hdrlen,unsigned char *payloa |
155 | 155 |
} |
156 | 156 |
numcontacts=payload[1]; |
157 | 157 |
if(numcontacts==0){ |
158 |
- SLOG(L_ERR,"no contacts present?\n"); |
|
158 |
+ LOG(L_ERR,"no contacts present?\n"); |
|
159 | 159 |
return -1; |
160 | 160 |
} |
161 | 161 |
for(i=0,offset=2+numcontacts;i<numcontacts;i++){ |
... | ... |
@@ -225,7 +225,7 @@ int dump_contact_body_test(char *hdr,int hdrlen,unsigned char *payload,int payle |
225 | 225 |
} |
226 | 226 |
numcontacts=payload[1]; |
227 | 227 |
if(numcontacts==0){ |
228 |
- SLOG(L_ERR,"no contacts present?\n"); |
|
228 |
+ LOG(L_ERR,"no contacts present?\n"); |
|
229 | 229 |
return -1; |
230 | 230 |
} |
231 | 231 |
if(segregationLevel & (JUNIT|SEGREGATE|ONLY_URIS)){ |
... | ... |
@@ -49,7 +49,7 @@ int encode_cseq(char *hdrstart,int hdrlen,struct cseq_body *body,unsigned char * |
49 | 49 |
i++; |
50 | 50 |
where[0]=i; |
51 | 51 |
if(str2int(&body->number,&cseqnum)<0){ |
52 |
- SLOG(L_ERR,"str2int(cseq number)\n"); |
|
52 |
+ LOG(L_ERR,"str2int(cseq number)\n"); |
|
53 | 53 |
return -1; |
54 | 54 |
} |
55 | 55 |
cseqnum=htonl(cseqnum); |
... | ... |
@@ -84,11 +84,11 @@ int encode_digest(char *hdrstart,int hdrlen,dig_cred_t *digest,unsigned char *wh |
84 | 84 |
memset(&sipuri,0,sizeof(struct sip_uri)); |
85 | 85 |
flags1|=HAS_URI_F; |
86 | 86 |
if (parse_uri(digest->uri.s, digest->uri.len,&sipuri) < 0 ) { |
87 |
- SLOG(L_ERR, "Bad URI in address\n"); |
|
87 |
+ LOG(L_ERR, "Bad URI in address\n"); |
|
88 | 88 |
return -1; |
89 | 89 |
}else{ |
90 | 90 |
if((j=encode_uri2(hdrstart,hdrlen,digest->uri,&sipuri,&where[i+1]))<0){ |
91 |
- SLOG(L_ERR, "Error encoding the URI\n"); |
|
91 |
+ LOG(L_ERR, "Error encoding the URI\n"); |
|
92 | 92 |
return -1; |
93 | 93 |
}else{ |
94 | 94 |
where[i]=(unsigned char)j; |
... | ... |
@@ -84,16 +84,16 @@ int encode_header(struct sip_msg *sipmsg,struct hdr_field *hdr,unsigned char *pa |
84 | 84 |
mlen=sipmsg->len; |
85 | 85 |
hdrstart = hdr->name.s; |
86 | 86 |
if(hdrstart-msg<0){ |
87 |
- SLOG(L_ERR,"header(%.*s) does not belong to sip_msg(hdrstart<msg)\n",hdr->name.len,hdr->name.s); |
|
87 |
+ LOG(L_ERR,"header(%.*s) does not belong to sip_msg(hdrstart<msg)\n",hdr->name.len,hdr->name.s); |
|
88 | 88 |
return -1; |
89 | 89 |
} |
90 | 90 |
ptr=htons((short int)(hdrstart-msg)); |
91 | 91 |
if((hdrstart-msg)>mlen){ |
92 |
- SLOG(L_ERR,"out of the sip_msg bounds (%d>%d)\n",ntohs(ptr),mlen); |
|
92 |
+ LOG(L_ERR,"out of the sip_msg bounds (%d>%d)\n",ntohs(ptr),mlen); |
|
93 | 93 |
return -1; |
94 | 94 |
} |
95 | 95 |
if(hdr->len>(1<<16)){ |
96 |
- SLOG(L_ERR,"length of header too long\n"); |
|
96 |
+ LOG(L_ERR,"length of header too long\n"); |
|
97 | 97 |
return -1; |
98 | 98 |
} |
99 | 99 |
memcpy(payload,&ptr,2); |
... | ... |
@@ -302,7 +302,7 @@ error: |
302 | 302 |
free_via_list(viabody); |
303 | 303 |
if(methods) |
304 | 304 |
pkg_free(methods); |
305 |
- SLOG(L_ERR,"%s",myerror); |
|
305 |
+ LOG(L_ERR,"%s",myerror); |
|
306 | 306 |
return -1; |
307 | 307 |
} |
308 | 308 |
|
... | ... |
@@ -195,7 +195,7 @@ int encode_msg(struct sip_msg *msg,char *payload,int len) |
195 | 195 |
(ms->u.reply.version.s-msg->buf)); |
196 | 196 |
if(request){ |
197 | 197 |
if (parse_uri(ms->u.request.uri.s,ms->u.request.uri.len, &miuri)<0){ |
198 |
- SLOG(L_ERR, "<%.*s>\n",ms->u.request.uri.len,ms->u.request.uri.s); |
|
198 |
+ LOG(L_ERR, "<%.*s>\n",ms->u.request.uri.len,ms->u.request.uri.s); |
|
199 | 199 |
myerror="while parsing the R-URI"; |
200 | 200 |
goto error; |
201 | 201 |
} |
... | ... |
@@ -224,7 +224,7 @@ int encode_msg(struct sip_msg *msg,char *payload,int len) |
224 | 224 |
memcpy(&payload[k+1],&h,2); |
225 | 225 |
/*TODO fix this... fixed with k-=3?*/ |
226 | 226 |
if(0>(i=encode_header(msg,hf,(unsigned char*)(payload+j),MAX_ENCODED_MSG+MAX_MESSAGE_LEN-j))){ |
227 |
- SLOG(L_ERR,"encoding header %.*s\n",hf->name.len,hf->name.s); |
|
227 |
+ LOG(L_ERR,"encoding header %.*s\n",hf->name.len,hf->name.s); |
|
228 | 228 |
goto error; |
229 | 229 |
k-=3; |
230 | 230 |
continue; |
... | ... |
@@ -248,13 +248,13 @@ int encode_msg(struct sip_msg *msg,char *payload,int len) |
248 | 248 |
/*pkg_free(payload2);*/ |
249 | 249 |
/*now we copy the actual message after the headers-meta-section*/ |
250 | 250 |
memcpy(&payload[j],msg->buf,msg->len); |
251 |
- SLOG(L_DBG,"msglen = %d,msg starts at %d\n",msg->len,j); |
|
251 |
+ LOG(L_DBG,"msglen = %d,msg starts at %d\n",msg->len,j); |
|
252 | 252 |
j=htons(j); |
253 | 253 |
/*now we copy at the beginning, the index to where the actual message starts*/ |
254 | 254 |
memcpy(&payload[MSG_START_IDX],&j,2); |
255 | 255 |
return GET_PAY_SIZE( payload ); |
256 | 256 |
error: |
257 |
- SLOG(L_ERR,"%s\n",myerror); |
|
257 |
+ LOG(L_ERR,"%s\n",myerror); |
|
258 | 258 |
return -1; |
259 | 259 |
} |
260 | 260 |
|
... | ... |
@@ -276,7 +276,7 @@ int decode_msg(struct sip_msg *msg,char *code, unsigned int len) |
276 | 276 |
goto error; |
277 | 277 |
} |
278 | 278 |
error: |
279 |
- SLOG(L_ERR,"(%s)\n",myerror); |
|
279 |
+ LOG(L_ERR,"(%s)\n",myerror); |
|
280 | 280 |
return -1; |
281 | 281 |
} |
282 | 282 |
|
... | ... |
@@ -52,7 +52,7 @@ int encode_route_body(char *hdr,int hdrlen,rr_t *route_parsed,unsigned char *whe |
52 | 52 |
flags=0; |
53 | 53 |
for(route_offset=0,i=0,myroute=route_parsed;myroute;myroute=myroute->next,i++){ |
54 | 54 |
if((k=encode_route(hdr,hdrlen,myroute,&tmp[route_offset]))<0){ |
55 |
- SLOG(L_ERR,"parsing route number %d\n",i); |
|
55 |
+ LOG(L_ERR,"parsing route number %d\n",i); |
|
56 | 56 |
return -1; |
57 | 57 |
} |
58 | 58 |
where[2+i]=(unsigned char)k; |
... | ... |
@@ -88,11 +88,11 @@ int encode_route(char *hdrstart,int hdrlen,rr_t *body,unsigned char *where) |
88 | 88 |
} |
89 | 89 |
|
90 | 90 |
if (parse_uri(body->nameaddr.uri.s, body->nameaddr.uri.len,&puri) < 0 ) { |
91 |
- SLOG(L_ERR, "Bad URI in address\n"); |
|
91 |
+ LOG(L_ERR, "Bad URI in address\n"); |
|
92 | 92 |
return -1; |
93 | 93 |
}else{ |
94 | 94 |
if((j=encode_uri2(hdrstart,hdrlen,body->nameaddr.uri,&puri,&where[i]))<0){ |
95 |
- SLOG(L_ERR, "error codifying the URI\n"); |
|
95 |
+ LOG(L_ERR, "error codifying the URI\n"); |
|
96 | 96 |
return -1; |
97 | 97 |
}else{ |
98 | 98 |
i+=j; |
... | ... |
@@ -117,7 +117,7 @@ int print_encoded_route_body(int fd,char *hdr,int hdrlen,unsigned char *payload, |
117 | 117 |
|
118 | 118 |
numroutes=payload[1]; |
119 | 119 |
if(numroutes==0){ |
120 |
- SLOG(L_ERR,"no routes present?\n"); |
|
120 |
+ LOG(L_ERR,"no routes present?\n"); |
|
121 | 121 |
return -1; |
122 | 122 |
} |
123 | 123 |
for(i=0,offset=2+numroutes;i<numroutes;i++){ |
... | ... |
@@ -169,7 +169,7 @@ int dump_route_body_test(char *hdr,int hdrlen,unsigned char *payload,int paylen, |
169 | 169 |
|
170 | 170 |
numroutes=payload[1]; |
171 | 171 |
if(numroutes==0){ |
172 |
- SLOG(L_ERR,"no routes present?\n"); |
|
172 |
+ LOG(L_ERR,"no routes present?\n"); |
|
173 | 173 |
return -1; |
174 | 174 |
} |
175 | 175 |
if(segregationLevel & (JUNIT|SEGREGATE|ONLY_URIS)){ |
... | ... |
@@ -66,11 +66,11 @@ int encode_to_body(char *hdrstart,int hdrlen,struct to_body *body,unsigned char |
66 | 66 |
where[i++]=(unsigned char)body->tag_value.len; |
67 | 67 |
} |
68 | 68 |
if (parse_uri(body->uri.s, body->uri.len,&puri) < 0 ) { |
69 |
- SLOG(L_ERR, "Bad URI in address\n"); |
|
69 |
+ LOG(L_ERR, "Bad URI in address\n"); |
|
70 | 70 |
return -1; |
71 | 71 |
}else{ |
72 | 72 |
if((j=encode_uri2(hdrstart,hdrlen,body->uri,&puri,&where[i]))<0){ |
73 |
- SLOG(L_ERR, "error codifying the URI\n"); |
|
73 |
+ LOG(L_ERR, "error codifying the URI\n"); |
|
74 | 74 |
return -1; |
75 | 75 |
}else{ |
76 | 76 |
i+=j; |
... | ... |
@@ -101,7 +101,7 @@ int encode_uri2(char *hdr,int hdrlen,str uri_str, struct sip_uri *uri_parsed,uns |
101 | 101 |
|
102 | 102 |
uriptr=REL_PTR(hdr,uri_str.s); |
103 | 103 |
if(uri_str.len>255 || uriptr>hdrlen){ |
104 |
- SLOG(L_ERR,"uri too long, or out of the sip_msg bounds\n"); |
|
104 |
+ LOG(L_ERR,"uri too long, or out of the sip_msg bounds\n"); |
|
105 | 105 |
return -1; |
106 | 106 |
} |
107 | 107 |
payload[0]=uriptr; |
... | ... |
@@ -56,7 +56,7 @@ int encode_via_body(char *hdr,int hdrlen,struct via_body *via_parsed,unsigned ch |
56 | 56 |
if(via_parsed) |
57 | 57 |
for(via_offset=0,i=0,myvia=via_parsed;myvia;myvia=myvia->next,i++){ |
58 | 58 |
if((k=encode_via(hdr,hdrlen,myvia,&tmp[via_offset]))<0){ |
59 |
- SLOG(L_ERR,"parsing via number %d\n",i); |
|
59 |
+ LOG(L_ERR,"parsing via number %d\n",i); |
|
60 | 60 |
return -1; |
61 | 61 |
} |
62 | 62 |
where[2+i]=(unsigned char)k; |
... | ... |
@@ -142,7 +142,7 @@ int print_encoded_via_body(int fd,char *hdr,int hdrlen,unsigned char *payload,in |
142 | 142 |
numvias=payload[1]; |
143 | 143 |
dprintf(fd,"%s%d","NUMBER OF VIAS:",numvias); |
144 | 144 |
if(numvias==0){ |
145 |
- SLOG(L_ERR,"no vias present?\n"); |
|
145 |
+ LOG(L_ERR,"no vias present?\n"); |
|
146 | 146 |
return -1; |
147 | 147 |
} |
148 | 148 |
for(i=0,offset=2+numvias;i<numvias;i++){ |
... | ... |
@@ -217,7 +217,7 @@ int dump_via_body_test(char *hdr,int hdrlen,unsigned char *payload,int paylen,in |
217 | 217 |
|
218 | 218 |
numvias=payload[1]; |
219 | 219 |
if(numvias==0){ |
220 |
- SLOG(L_ERR,"no vias present?\n"); |
|
220 |
+ LOG(L_ERR,"no vias present?\n"); |
|
221 | 221 |
return -1; |
222 | 222 |
} |
223 | 223 |
if(segregationLevel & SEGREGATE) |
... | ... |
@@ -86,11 +86,11 @@ int dispatcher_main_loop() |
86 | 86 |
|
87 | 87 |
strcpy(whoami,"Seas Event Dispatcher process"); |
88 | 88 |
/*I set process_no to -1 because otherwise, the logging process confuses this process with another from SER |
89 |
- * (see SLOG() and dprint() and my_pid())*/ |
|
89 |
+ * (see LOG() and dprint() and my_pid())*/ |
|
90 | 90 |
process_no = -1; |
91 | 91 |
|
92 | 92 |
if(open_server_sockets(seas_listen_ip,seas_listen_port,socks)==-1){ |
93 |
- SLOG(L_ERR,"unable to open server sockets on dispatcher\n"); |
|
93 |
+ LOG(L_ERR,"unable to open server sockets on dispatcher\n"); |
|
94 | 94 |
return -1; |
95 | 95 |
} |
96 | 96 |
for(i=0;i<2;i++){ |
... | ... |
@@ -112,11 +112,11 @@ int dispatcher_main_loop() |
112 | 112 |
if(sig_flag==SIGCHLD){ |
113 | 113 |
while ((chld=waitpid( -1, &chld_status, WNOHANG ))>0) { |
114 | 114 |
if (WIFEXITED(chld_status)){ |
115 |
- SLOG(L_INFO, "child process %d exited normally, status=%d\n",chld,WEXITSTATUS(chld_status)); |
|
115 |
+ LOG(L_INFO, "child process %d exited normally, status=%d\n",chld,WEXITSTATUS(chld_status)); |
|
116 | 116 |
}else if (WIFSIGNALED(chld_status)) { |
117 |
- SLOG(L_INFO, "child process %d exited by a signal %d\n",chld,WTERMSIG(chld_status)); |
|
117 |
+ LOG(L_INFO, "child process %d exited by a signal %d\n",chld,WTERMSIG(chld_status)); |
|
118 | 118 |
}else if (WIFSTOPPED(chld_status)) |
119 |
- SLOG(L_INFO, "child process %d stopped by a signal %d\n",chld,WSTOPSIG(chld_status)); |
|
119 |
+ LOG(L_INFO, "child process %d stopped by a signal %d\n",chld,WSTOPSIG(chld_status)); |
|
120 | 120 |
for (as=as_list;as;as=as->next) { |
121 | 121 |
if(as->type!=AS_TYPE) |
122 | 122 |
continue; |
... | ... |
@@ -124,7 +124,7 @@ int dispatcher_main_loop() |
124 | 124 |
for(i=0;i<as_nr && ((poll_fds[3+i].fd)!=(as->u.as.event_fd));i++) |
125 | 125 |
; |
126 | 126 |
if(i==as_nr){ |
127 |
- SLOG(L_ERR,"Either the pinger has died or BUG found..\n"); |
|
127 |
+ LOG(L_ERR,"Either the pinger has died or BUG found..\n"); |
|
128 | 128 |
continue; |
129 | 129 |
} |
130 | 130 |
/*overwrite the obsolete 'i' position with the next position*/ |
... | ... |
@@ -144,17 +144,17 @@ int dispatcher_main_loop() |
144 | 144 |
destroy_pingtable(&as->u.as.jain_pings); |
145 | 145 |
destroy_pingtable(&as->u.as.servlet_pings); |
146 | 146 |
as_nr--; |
147 |
- SLOG(L_WARN,"client [%.*s] leaving (Action Dispatcher Process died !)\n",as->name.len,as->name.s); |
|
147 |
+ LOG(L_WARN,"client [%.*s] leaving (Action Dispatcher Process died !)\n",as->name.len,as->name.s); |
|
148 | 148 |
break; |
149 | 149 |
}/*if(action_pid==chld)*/ |
150 | 150 |
}/*for(as=as_list;as;as=as->next)*/ |
151 | 151 |
}/*while(waitpid(-1)>0)*/ |
152 | 152 |
}else if (sig_flag) { |
153 |
- SLOG(L_WARN,"received signal != sigchld(%d)\n",sig_flag); |
|
153 |
+ LOG(L_WARN,"received signal != sigchld(%d)\n",sig_flag); |
|
154 | 154 |
} |
155 | 155 |
sig_flag=0; |
156 | 156 |
clean_index=0; |
157 |
- SLOG(L_INFO,"polling [2 ServSock] [1 pipe] [%d App Servers] [%d Uncomplete AS]\n",as_nr,unc_as_nr); |
|
157 |
+ LOG(L_INFO,"polling [2 ServSock] [1 pipe] [%d App Servers] [%d Uncomplete AS]\n",as_nr,unc_as_nr); |
|
158 | 158 |
poll_events = poll(poll_fds,3+unc_as_nr+as_nr,-1); |
159 | 159 |
if (poll_events == -1) { |
160 | 160 |
if(errno==EINTR){ |
... | ... |
@@ -163,11 +163,11 @@ int dispatcher_main_loop() |
163 | 163 |
continue; |
164 | 164 |
} |
165 | 165 |
if(errno==EBADF){ |
166 |
- SLOG(L_ERR, "invalid file descriptor pased to poll (%s)\n",strerror(errno)); |
|
166 |
+ LOG(L_ERR, "invalid file descriptor pased to poll (%s)\n",strerror(errno)); |
|
167 | 167 |
return -1;/*??*/ |
168 | 168 |
} |
169 | 169 |
/* errors */ |
170 |
- SLOG(L_ERR,"poll'ing:%s\n",strerror(errno)); |
|
170 |
+ LOG(L_ERR,"poll'ing:%s\n",strerror(errno)); |
|
171 | 171 |
poll_events=0; |
172 | 172 |
continue; |
173 | 173 |
} else if (poll_events == 0) {/*timeout*/ |
... | ... |
@@ -184,9 +184,9 @@ int dispatcher_main_loop() |
184 | 184 |
poll_tmp->fd=fd; |
185 | 185 |
poll_tmp->events=POLLIN|POLLHUP; |
186 | 186 |
unc_as_nr++; |
187 |
- SLOG(L_DBG,"Have new %s client\n",i==0?"event":"action"); |
|
187 |
+ LOG(L_DBG,"Have new %s client\n",i==0?"event":"action"); |
|
188 | 188 |
}else{ |
189 |
- SLOG(L_ERR,"accepting connection from AS\n"); |
|
189 |
+ LOG(L_ERR,"accepting connection from AS\n"); |
|
190 | 190 |
} |
191 | 191 |
} |
192 | 192 |
} |
... | ... |
@@ -195,36 +195,36 @@ int dispatcher_main_loop() |
195 | 195 |
poll_fds[2].revents &= (~POLLIN); |
196 | 196 |
poll_events--; |
197 | 197 |
if(dispatch_relay()<0){ |
198 |
- SLOG(L_ERR,"dispatch_relay returned -1" |
|
198 |
+ LOG(L_ERR,"dispatch_relay returned -1" |
|
199 | 199 |
"should clean-up table\n"); |
200 | 200 |
} |
201 | 201 |
} |
202 | 202 |
/*now handle receive data from completed AS*/ |
203 | 203 |
clean_index=0; |
204 |
- SLOG(L_DBG,"Scanning data from %d AS\n",as_nr); |
|
204 |
+ LOG(L_DBG,"Scanning data from %d AS\n",as_nr); |
|
205 | 205 |
for(i=0;(i<as_nr) && poll_events;i++){ |
206 | 206 |
clean_index=0; |
207 | 207 |
poll_tmp=&poll_fds[3+i]; |
208 | 208 |
if(poll_tmp->revents) |
209 | 209 |
poll_events--; |
210 | 210 |
if(poll_tmp->revents & POLLIN){ |
211 |
- SLOG(L_DBG,"POLLIN found in AS #%i\n",i); |
|
211 |
+ LOG(L_DBG,"POLLIN found in AS #%i\n",i); |
|
212 | 212 |
poll_tmp->revents &= (~POLLIN); |
213 | 213 |
switch(handle_as_data(poll_tmp->fd)){ |
214 | 214 |
case -2:/*read returned 0 bytes, an AS client is leaving*/ |
215 | 215 |
clean_index=1; |
216 | 216 |
break; |
217 | 217 |
case -1:/*shouldnt happen*/ |
218 |
- SLOG(L_ERR,"reading from AS socket\n"); |
|
218 |
+ LOG(L_ERR,"reading from AS socket\n"); |
|
219 | 219 |
break; |
220 | 220 |
case 0:/* event_response received and processed*/ |
221 | 221 |
break; |
222 | 222 |
default: |
223 |
- SLOG(L_WARN,"unknown return type from handle_as_data\n"); |
|
223 |
+ LOG(L_WARN,"unknown return type from handle_as_data\n"); |
|
224 | 224 |
} |
225 | 225 |
} |
226 | 226 |
if(clean_index || (poll_tmp->revents & POLLHUP)){ |
227 |
- SLOG(L_DBG,"POLHUP or read==0 found in %i AS \n",i); |
|
227 |
+ LOG(L_DBG,"POLHUP or read==0 found in %i AS \n",i); |
|
228 | 228 |
clean_index=0; |
229 | 229 |
poll_tmp->revents = 0; |
230 | 230 |
for(as=as_list;as;as=as->next){ |
... | ... |
@@ -243,24 +243,24 @@ int dispatcher_main_loop() |
243 | 243 |
poll_fds[j].revents=poll_fds[j+1].revents; |
244 | 244 |
} |
245 | 245 |
--i; |
246 |
- SLOG(L_WARN,"client %.*s leaving !!!\n",as->name.len,as->name.s); |
|
246 |
+ LOG(L_WARN,"client %.*s leaving !!!\n",as->name.len,as->name.s); |
|
247 | 247 |
break; |
248 | 248 |
} |
249 | 249 |
} |
250 | 250 |
if (!as) { |
251 |
- SLOG(L_ERR,"the leaving client was not found in the as_list\n"); |
|
251 |
+ LOG(L_ERR,"the leaving client was not found in the as_list\n"); |
|
252 | 252 |
} |
253 | 253 |
} |
254 | 254 |
} |
255 | 255 |
/*now handle data sent from uncompleted AS*/ |
256 |
- SLOG(L_DBG,"Scanning data from %d uncomplete AS \n",unc_as_nr); |
|
256 |
+ LOG(L_DBG,"Scanning data from %d uncomplete AS \n",unc_as_nr); |
|
257 | 257 |
clean_index=0; |
258 | 258 |
for(i=0;i<unc_as_nr && poll_events;i++){ |
259 | 259 |
poll_tmp=&poll_fds[3+as_nr+i]; |
260 | 260 |
if(poll_tmp->revents) |
261 | 261 |
poll_events--; |
262 | 262 |
if(poll_tmp->revents & POLLIN){ |
263 |
- SLOG(L_DBG,"POLLIN found in %d uncomplete AS \n",i); |
|
263 |
+ LOG(L_DBG,"POLLIN found in %d uncomplete AS \n",i); |
|
264 | 264 |
poll_tmp->revents &= (~POLLIN); |
265 | 265 |
fd=handle_unc_as_data(poll_tmp->fd); |
266 | 266 |
if(fd>0){ |
... | ... |
@@ -291,7 +291,7 @@ int dispatcher_main_loop() |
291 | 291 |
} |
292 | 292 |
} |
293 | 293 |
if(poll_tmp->revents & POLLHUP){ |
294 |
- SLOG(L_DBG,"POLLHUP found in %d uncomplete AS \n",i); |
|
294 |
+ LOG(L_DBG,"POLLHUP found in %d uncomplete AS \n",i); |
|
295 | 295 |
close(poll_tmp->fd); |
296 | 296 |
for(k=i;k<(unc_as_nr-1);k++){ |
297 | 297 |
j=3+as_nr+k; |
... | ... |
@@ -334,30 +334,30 @@ static int open_server_sockets(struct ip_addr *address,unsigned short port,int * |
334 | 334 |
fd[0]=fd[1]=-1; |
335 | 335 |
|
336 | 336 |
if(address->af!=AF_INET && address->af!=AF_INET6){ |
337 |
- SLOG(L_ERR,"Only ip and ipv6 allowed socket types\n"); |
|
337 |
+ LOG(L_ERR,"Only ip and ipv6 allowed socket types\n"); |
|
338 | 338 |
return -1; |
339 | 339 |
} |
340 | 340 |
|
341 | 341 |
for(i=0;i<2;i++){ |
342 | 342 |
if(init_su(&su,address,port+i)<0){ |
343 |
- SLOG(L_ERR,"unable to init sockaddr_union\n"); |
|
343 |
+ LOG(L_ERR,"unable to init sockaddr_union\n"); |
|
344 | 344 |
return -1; |
345 | 345 |
} |
346 | 346 |
if((fd[i]=socket(AF2PF(su.s.sa_family), SOCK_STREAM, 0))==-1){ |
347 |
- SLOG(L_ERR,"trying to open server %s socket (%s)\n",i==0?"event":"action",strerror(errno)); |
|
347 |
+ LOG(L_ERR,"trying to open server %s socket (%s)\n",i==0?"event":"action",strerror(errno)); |
|
348 | 348 |
goto error; |
349 | 349 |
} |
350 | 350 |
optval=1; |
351 | 351 |
if (setsockopt(fd[i], SOL_SOCKET, SO_REUSEADDR, (void*)&optval, sizeof(optval))==-1) { |
352 |
- SLOG(L_ERR,"setsockopt (%s)\n",strerror(errno)); |
|
352 |
+ LOG(L_ERR,"setsockopt (%s)\n",strerror(errno)); |
|
353 | 353 |
goto error; |
354 | 354 |
} |
355 | 355 |
if ((bind(fd[i], &su.s,sizeof(union sockaddr_union)))==-1){ |
356 |
- SLOG(L_ERR, "bind (%s)\n",strerror(errno)); |
|
356 |
+ LOG(L_ERR, "bind (%s)\n",strerror(errno)); |
|
357 | 357 |
goto error; |
358 | 358 |
} |
359 | 359 |
if (listen(fd[i], 10)==-1){ |
360 |
- SLOG(L_ERR, "listen (%s)\n",strerror(errno)); |
|
360 |
+ LOG(L_ERR, "listen (%s)\n",strerror(errno)); |
|
361 | 361 |
goto error; |
362 | 362 |
} |
363 | 363 |
} |
... | ... |
@@ -402,13 +402,13 @@ read_again: |
402 | 402 |
if(errno==EINTR){ |
403 | 403 |
goto read_again; |
404 | 404 |
}else{ |
405 |
- SLOG(L_ERR,"Dispatcher Process " |
|
405 |
+ LOG(L_ERR,"Dispatcher Process " |
|
406 | 406 |
"received unknown error reading from pipe (%s)\n",strerror(errno)); |
407 | 407 |
retval=-1; |
408 | 408 |
goto error; |
409 | 409 |
} |
410 | 410 |
}else if(i==0){ |
411 |
- SLOG(L_ERR,"Dispatcher Process " |
|
411 |
+ LOG(L_ERR,"Dispatcher Process " |
|
412 | 412 |
"received 0 while reading from pipe\n"); |
413 | 413 |
goto error; |
414 | 414 |
}else{ |
... | ... |
@@ -418,7 +418,7 @@ read_again: |
418 | 418 |
} |
419 | 419 |
|
420 | 420 |
if (!thepointer.ptr) { |
421 |
- SLOG(L_ERR,"Received Corrupted pointer to event !!\n"); |
|
421 |
+ LOG(L_ERR,"Received Corrupted pointer to event !!\n"); |
|
422 | 422 |
retval=0; |
423 | 423 |
goto error; |
424 | 424 |
} |
... | ... |
@@ -426,7 +426,7 @@ read_again: |
426 | 426 |
if(use_stats && thepointer.ptr->transaction) |
427 | 427 |
event_stat(thepointer.ptr->transaction); |
428 | 428 |
if(thepointer.ptr->as == NULL || !thepointer.ptr->as->connected || thepointer.ptr->as->type==CLUSTER_TYPE){ |
429 |
- SLOG(L_WARN,"tryied to send an event to an App Server that is scheduled to die !!\n"); |
|
429 |
+ LOG(L_WARN,"tryied to send an event to an App Server that is scheduled to die !!\n"); |
|
430 | 430 |
retval=-2; |
431 | 431 |
goto error; |
432 | 432 |
} |
... | ... |
@@ -438,18 +438,18 @@ write_again: |
438 | 438 |
switch(errno){ |
439 | 439 |
case EINTR: |
440 | 440 |
if(!thepointer.ptr->as->connected){ |
441 |
- SLOG(L_WARN,"tryied to send an event to an App Server that is scheduled to die !!\n"); |
|
441 |
+ LOG(L_WARN,"tryied to send an event to an App Server that is scheduled to die !!\n"); |
|
442 | 442 |
retval=-2; |
443 | 443 |
goto error; |
444 | 444 |
} |
445 | 445 |
goto write_again; |
446 | 446 |
case EPIPE: |
447 |
- SLOG(L_ERR,"AS [%.*s] closed " |
|
447 |
+ LOG(L_ERR,"AS [%.*s] closed " |
|
448 | 448 |
"the socket !\n",thepointer.ptr->as->u.as.name.len,thepointer.ptr->as->u.as.name.s); |
449 | 449 |
retval=-2; |
450 | 450 |
goto error; |
451 | 451 |
default: |
452 |
- SLOG(L_ERR,"unknown error while " |
|
452 |
+ LOG(L_ERR,"unknown error while " |
|
453 | 453 |
"trying to write to AS socket(%s)\n",strerror(errno)); |
454 | 454 |
retval=-2; |
455 | 455 |
goto error; |
... | ... |
@@ -460,12 +460,12 @@ write_again: |
460 | 460 |
goto write_again; |
461 | 461 |
}else if(i==0){ |
462 | 462 |
if (tries++ > MAX_WRITE_TRIES) { |
463 |
- SLOG(L_ERR,"MAX WRITE TRIES !!!\n"); |
|
463 |
+ LOG(L_ERR,"MAX WRITE TRIES !!!\n"); |
|
464 | 464 |
goto error; |
465 | 465 |
}else |
466 | 466 |
goto write_again; |
467 | 467 |
} |
468 |
- SLOG(L_DBG,"Event relaied to %.*s AS\n",thepointer.ptr->as->u.as.name.len,thepointer.ptr->as->u.as.name.s); |
|
468 |
+ LOG(L_DBG,"Event relaied to %.*s AS\n",thepointer.ptr->as->u.as.name.len,thepointer.ptr->as->u.as.name.s); |
|
469 | 469 |
LOG(L_DBG,"Event type %s \n",action_names[thepointer.ptr->type]); |
470 | 470 |
retval=0; |
471 | 471 |
error: |
... | ... |
@@ -503,13 +503,13 @@ static inline int add_new_as(int event_idx,int action_idx,struct as_entry *as) |
503 | 503 |
if(use_ha){ |
504 | 504 |
if(jain_ping_timeout){ |
505 | 505 |
if (0>init_pingtable(&the_as->jain_pings,jain_ping_timeout,(jain_ping_timeout/jain_ping_period+1)*PING_OVER_FACTOR)){ |
506 |
- SLOG(L_ERR,"Unable to init jain pinging table...\n"); |
|
506 |
+ LOG(L_ERR,"Unable to init jain pinging table...\n"); |
|
507 | 507 |
goto error; |
508 | 508 |
} |
509 | 509 |
} |
510 | 510 |
if(servlet_ping_timeout){ |
511 | 511 |
if (0>init_pingtable(&the_as->servlet_pings,servlet_ping_timeout,(servlet_ping_timeout/servlet_ping_period+1)*PING_OVER_FACTOR)){ |
512 |
- SLOG(L_ERR,"Unable to init servlet pinging table...\n"); |
|
512 |
+ LOG(L_ERR,"Unable to init servlet pinging table...\n"); |
|
513 | 513 |
goto error; |
514 | 514 |
} |
515 | 515 |
} |
... | ... |
@@ -517,7 +517,7 @@ static inline int add_new_as(int event_idx,int action_idx,struct as_entry *as) |
517 | 517 |
/*TODO attention, this is pkg_malloc because only the Event_Dispatcher process |
518 | 518 |
* has to use it !!*/ |
519 | 519 |
if(!(the_as->ev_buffer.s = pkg_malloc(AS_BUF_SIZE))){ |
520 |
- SLOG(L_ERR,"unable to alloc pkg mem for the event buffer\n"); |
|
520 |
+ LOG(L_ERR,"unable to alloc pkg mem for the event buffer\n"); |
|
521 | 521 |
goto error; |
522 | 522 |
} |
523 | 523 |
the_as->ev_buffer.len=0; |
... | ... |
@@ -530,7 +530,7 @@ static inline int add_new_as(int event_idx,int action_idx,struct as_entry *as) |
530 | 530 |
if (tmp->u.cs.as_names[j].len == the_as->name.len && |
531 | 531 |
!memcmp(tmp->u.cs.as_names[j].s,the_as->name.s,the_as->name.len)) { |
532 | 532 |
if(tmp->u.cs.num==tmp->u.cs.registered){ |
533 |
- SLOG(L_ERR,"AS %.*s belongs to cluster %.*s which is already completed\n", |
|
533 |
+ LOG(L_ERR,"AS %.*s belongs to cluster %.*s which is already completed\n", |
|
534 | 534 |
the_as->name.len,the_as->name.s,tmp->name.len,tmp->name.s); |
535 | 535 |
break; |
536 | 536 |
} |
... | ... |
@@ -540,11 +540,11 @@ static inline int add_new_as(int event_idx,int action_idx,struct as_entry *as) |
540 | 540 |
} |
541 | 541 |
} |
542 | 542 |
if(0>spawn_action_dispatcher(as)){ |
543 |
- SLOG(L_ERR,"Unable to spawn Action Dispatcher for as %s\n",ev->name); |
|
543 |
+ LOG(L_ERR,"Unable to spawn Action Dispatcher for as %s\n",ev->name); |
|
544 | 544 |
goto error; |
545 | 545 |
} |
546 | 546 |
if(send_sockinfo(the_as->event_fd)==-1){ |
547 |
- SLOG(L_ERR,"Unable to send socket info to as %s\n",ev->name); |
|
547 |
+ LOG(L_ERR,"Unable to send socket info to as %s\n",ev->name); |
|
548 | 548 |
goto error; |
549 | 549 |
} |
550 | 550 |
return 0; |
... | ... |
@@ -595,7 +595,7 @@ static inline int send_sockinfo(int fd) |
595 | 595 |
for(s=tls_listen;s;s=s->next,i++); |
596 | 596 |
#endif |
597 | 597 |
if(i==0){ |
598 |
- SLOG(L_ERR,"no udp|tcp|tls sockets ?!!\n"); |
|
598 |
+ LOG(L_ERR,"no udp|tcp|tls sockets ?!!\n"); |
|
599 | 599 |
return -1; |
600 | 600 |
} |
601 | 601 |
buffer[k++]=i; |
... | ... |
@@ -648,7 +648,7 @@ static inline int print_sock_info(char *buffer,int wheremax,int *idx,struct sock |
648 | 648 |
k=*idx; |
649 | 649 |
buffer[k++]=(char)type; |
650 | 650 |
if((i=(unsigned char)s->name.len)>30){ |
651 |
- SLOG(L_ERR,"name too long\n"); |
|
651 |
+ LOG(L_ERR,"name too long\n"); |
|
652 | 652 |
return -1; |
653 | 653 |
} |
654 | 654 |
buffer[k++]=i; |
... | ... |
@@ -684,23 +684,23 @@ static int handle_as_data(int fd) |
684 | 684 |
if(as->type == AS_TYPE && as->connected && (as->u.as.event_fd==fd)) |
685 | 685 |
break; |
686 | 686 |
if(!as){ |
687 |
- SLOG(L_ERR,"AS not found\n"); |
|
687 |
+ LOG(L_ERR,"AS not found\n"); |
|
688 | 688 |
return -1; |
689 | 689 |
} |
690 | 690 |
k=AS_BUF_SIZE-(as->u.as.ev_buffer.len); |
691 | 691 |
again: |
692 | 692 |
if((j=read(fd,as->u.as.ev_buffer.s+as->u.as.ev_buffer.len,k))<0){ |
693 |
- SLOG(L_ERR,"reading data for as %.*s\n",as->name.len,as->name.s); |
|
693 |
+ LOG(L_ERR,"reading data for as %.*s\n",as->name.len,as->name.s); |
|
694 | 694 |
if(errno==EINTR) |
695 | 695 |
goto again; |
696 | 696 |
else |
697 | 697 |
return -1; |
698 | 698 |
}else if(j==0){ |
699 |
- SLOG(L_ERR,"AS client leaving (%.*s)\n",as->name.len,as->name.s); |
|
699 |
+ LOG(L_ERR,"AS client leaving (%.*s)\n",as->name.len,as->name.s); |
|
700 | 700 |
return -2; |
701 | 701 |
} |
702 | 702 |
as->u.as.ev_buffer.len+=j; |
703 |
- SLOG(L_DBG,"read %d bytes from AS (total = %d)\n",j,as->u.as.ev_buffer.len); |
|
703 |
+ LOG(L_DBG,"read %d bytes from AS (total = %d)\n",j,as->u.as.ev_buffer.len); |
|
704 | 704 |
if(as->u.as.ev_buffer.len>5) |
705 | 705 |
process_event_reply(&as->u.as); |
706 | 706 |
return 0; |
... | ... |
@@ -734,18 +734,18 @@ static int process_event_reply(as_p as) |
734 | 734 |
/*if ev_len > BUF_SIZE then a flag should be put on the AS so that the whole length |
735 | 735 |
* of the action is skipped, until a mechanism for handling big packets is implemented*/ |
736 | 736 |
if(ev_len>AS_BUF_SIZE){ |
737 |
- SLOG(L_WARN,"Packet too big (%d)!!! should be skipped and an error returned!\n",ev_len); |
|
737 |
+ LOG(L_WARN,"Packet too big (%d)!!! should be skipped and an error returned!\n",ev_len); |
|
738 | 738 |
return -1; |
739 | 739 |
} |
740 | 740 |
if((as->ev_buffer.len<ev_len) || as->ev_buffer.len<4) |
741 | 741 |
return 0; |
742 | 742 |
switch(as->ev_buffer.s[4]){ |
743 | 743 |
case BIND_AC: |
744 |
- SLOG(L_DBG,"Processing a BIND action from AS (length=%d): %.*s\n",ev_len,as->name.len,as->name.s); |
|
744 |
+ LOG(L_DBG,"Processing a BIND action from AS (length=%d): %.*s\n",ev_len,as->name.len,as->name.s); |
|
745 | 745 |
process_bind_action(as,&as->ev_buffer.s[5],ev_len-5); |
746 | 746 |
break; |
747 | 747 |
case UNBIND_AC: |
748 |
- SLOG(L_DBG,"Processing a UNBIND action from AS (length=%d): %.*s\n",ev_len,as->name.len,as->name.s); |
|
748 |
+ LOG(L_DBG,"Processing a UNBIND action from AS (length=%d): %.*s\n",ev_len,as->name.len,as->name.s); |
|
749 | 749 |
process_unbind_action(as,&as->ev_buffer.s[5],ev_len-5); |
750 | 750 |
break; |
751 | 751 |
default: |
... | ... |
@@ -787,7 +787,7 @@ int process_bind_action(as_p as,char *payload,int len) |
787 | 787 |
break; |
788 | 788 |
} |
789 | 789 |
if(i==MAX_BINDS){ |
790 |
- SLOG(L_ERR,"No more bindings allowed. Ignoring bind request for processor %d\n",processor_id); |
|
790 |
+ LOG(L_ERR,"No more bindings allowed. Ignoring bind request for processor %d\n",processor_id); |
|
791 | 791 |
return -1; |
792 | 792 |
} |
793 | 793 |
memset(&my_addr,0,sizeof(struct ip_addr)); |
... | ... |
@@ -828,12 +828,12 @@ int process_bind_action(as_p as,char *payload,int len) |
828 | 828 |
as->binds[i]=si; |
829 | 829 |
as->bound_processor[i]=processor_id; |
830 | 830 |
as->num_binds++; |
831 |
- SLOG(L_DBG,"AS processor with id: %d bound to %s %s %d\n",processor_id,proto_s,buffer,port); |
|
831 |
+ LOG(L_DBG,"AS processor with id: %d bound to %s %s %d\n",processor_id,proto_s,buffer,port); |
|
832 | 832 |
return 0; |
833 | 833 |
} |
834 | 834 |
} |
835 | 835 |
error: |
836 |
- SLOG(L_ERR,"Cannot bind to %s %s %d !!!\n",proto_s,buffer,port); |
|
836 |
+ LOG(L_ERR,"Cannot bind to %s %s %d !!!\n",proto_s,buffer,port); |
|
837 | 837 |
return -1; |
838 | 838 |
} |
839 | 839 |
|
... | ... |
@@ -856,12 +856,12 @@ int process_unbind_action(as_p as,char *payload,int len) |
856 | 856 |
break; |
857 | 857 |
} |
858 | 858 |
if(i==MAX_BINDS){ |
859 |
- SLOG(L_ERR,"tried to unbind a processor which is not registered (id=%d)!\n",processor_id); |
|
859 |
+ LOG(L_ERR,"tried to unbind a processor which is not registered (id=%d)!\n",processor_id); |
|
860 | 860 |
return 0; |
861 | 861 |
} |
862 | 862 |
as->bound_processor[i]=0; |
863 | 863 |
as->num_binds--; |
864 |
- SLOG(L_DBG,"AS processor un-bound with id: %d\n",processor_id); |
|
864 |
+ LOG(L_DBG,"AS processor un-bound with id: %d\n",processor_id); |
|
865 | 865 |
return 0; |
866 | 866 |
} |
867 | 867 |
|
... | ... |
@@ -884,23 +884,23 @@ static int handle_unc_as_data(int fd) |
884 | 884 |
if(unc_as_t[i].valid && unc_as_t[i].fd==fd) |
885 | 885 |
break; |
886 | 886 |
if(i==2*MAX_UNC_AS_NR){ |
887 |
- SLOG(L_ERR,"has received an fd which is not in uncompleted AS array\n"); |
|
887 |
+ LOG(L_ERR,"has received an fd which is not in uncompleted AS array\n"); |
|
888 | 888 |
return -1; |
889 | 889 |
} |
890 | 890 |
if(unc_as_t[i].flags & HAS_NAME){/*shouldn't happen, if it has a name, it shouldnt be in fdset[]*/ |
891 |
- SLOG(L_WARN,"BUG this shouldn't happen\n"); |
|
891 |
+ LOG(L_WARN,"BUG this shouldn't happen\n"); |
|
892 | 892 |
return 0;/*already have a name, please take me out the uncompleted AS array*/ |
893 | 893 |
} |
894 |
- SLOG(L_DBG,"Reading client name\n"); |
|
894 |
+ LOG(L_DBG,"Reading client name\n"); |
|
895 | 895 |
|
896 | 896 |
if(-1==(len=read_name(fd,unc_as_t[i].name,MAX_AS_NAME))){ |
897 | 897 |
/*this guy should be disconnected, it sent an AS_NAME too long*/ |
898 |
- SLOG(L_ERR,"Bad name passed from fd\n"); |
|
898 |
+ LOG(L_ERR,"Bad name passed from fd\n"); |
|
899 | 899 |
unc_as_t[i].valid=0; |
900 | 900 |
unc_as_t[i].flags=0; |
901 | 901 |
return -2; |
902 | 902 |
}else if(len==-2){ |
903 |
- SLOG(L_WARN,"client disconnected\n"); |
|
903 |
+ LOG(L_WARN,"client disconnected\n"); |
|
904 | 904 |
return -2; |
905 | 905 |
} |
906 | 906 |
name1=unc_as_t[i].name; |
... | ... |
@@ -909,7 +909,7 @@ static int handle_unc_as_data(int fd) |
909 | 909 |
for(as=as_list;as;as=as->next){ |
910 | 910 |
if(as->name.len==len && !memcmp(name1,as->name.s,len)){ |
911 | 911 |
if(as->connected){ |
912 |
- SLOG(L_WARN,"AppServer trying to connect with a name already taken (%.*s)\n",len,name1); |
|
912 |
+ LOG(L_WARN,"AppServer trying to connect with a name already taken (%.*s)\n",len,name1); |
|
913 | 913 |
unc_as_t[i].valid=0; |
914 | 914 |
unc_as_t[i].flags=0; |
915 | 915 |
return -2; |
... | ... |
@@ -918,7 +918,7 @@ static int handle_unc_as_data(int fd) |
918 | 918 |
} |
919 | 919 |
} |
920 | 920 |
if (!as) { |
921 |
- SLOG(L_ERR,"a client tried to connect which is not declared in config. script(%.*s)\n",len,name1); |
|
921 |
+ LOG(L_ERR,"a client tried to connect which is not declared in config. script(%.*s)\n",len,name1); |
|
922 | 922 |
unc_as_t[i].valid=0; |
923 | 923 |
unc_as_t[i].flags=0; |
924 | 924 |
return -2; |
... | ... |
@@ -933,10 +933,10 @@ static int handle_unc_as_data(int fd) |
933 | 933 |
(unc_as_t[j].flags & HAS_NAME) && |
934 | 934 |
!strcmp(unc_as_t[i].name,unc_as_t[j].name)) |
935 | 935 |
break; |
936 |
- SLOG(L_INFO,"Fantastic, we have a new client: %s\n",unc_as_t[i].name); |
|
936 |
+ LOG(L_INFO,"Fantastic, we have a new client: %s\n",unc_as_t[i].name); |
|
937 | 937 |
if(j==k)/* the unc_as peer's socket hasn't been found, just take this one out of fdset because it already has its name */ |
938 | 938 |
return 0;/*take me out from fdset[]*/ |
939 |
- SLOG(L_INFO,"EUREKA, we have a new completed AS: %s\n",unc_as_t[i].name); |
|
939 |
+ LOG(L_INFO,"EUREKA, we have a new completed AS: %s\n",unc_as_t[i].name); |
|
940 | 940 |
/* EUREKA ! we have a sweet pair of AS sockets, with the same name !!*/ |
941 | 941 |
if(add_new_as(i<j?i:j,i<j?j:i,as)==-1){ |
942 | 942 |
close(unc_as_t[j].fd); |
... | ... |
@@ -964,15 +964,15 @@ try_again1: |
964 | 964 |
if(errno==EINTR) |
965 | 965 |
goto try_again1; |
966 | 966 |
else{ |
967 |
- SLOG(L_ERR,"trying to read length from fd=%d (%s)\n",sock,strerror(errno)); |
|
967 |
+ LOG(L_ERR,"trying to read length from fd=%d (%s)\n",sock,strerror(errno)); |
|
968 | 968 |
return -1; |
969 | 969 |
} |
970 | 970 |
}else if(n==0){ |
971 |
- SLOG(L_WARN,"uncomplete AS has disconnected before giving its name\n"); |
|
971 |
+ LOG(L_WARN,"uncomplete AS has disconnected before giving its name\n"); |
|
972 | 972 |
return -2; |
973 | 973 |
} |
974 | 974 |
if(namelen>dstlen || namelen==0){ |
975 |
- SLOG(L_ERR,"name too long to fit in dst (%d > %d)\n",namelen,dstlen); |
|
975 |
+ LOG(L_ERR,"name too long to fit in dst (%d > %d)\n",namelen,dstlen); |
|
976 | 976 |
return -1; |
977 | 977 |
} |
978 | 978 |
try_again2: |
... | ... |
@@ -980,11 +980,11 @@ try_again2: |
980 | 980 |
if(errno==EINTR) |
981 | 981 |
goto try_again2; |
982 | 982 |
else{ |
983 |
- SLOG(L_ERR,"trying to read %d chars into %p from fd=%d (%s)\n",namelen,dst,sock,strerror(errno)); |
|
983 |
+ LOG(L_ERR,"trying to read %d chars into %p from fd=%d (%s)\n",namelen,dst,sock,strerror(errno)); |
|
984 | 984 |
return -1; |
985 | 985 |
} |
986 | 986 |
}else if(n==0){ |
987 |
- SLOG(L_WARN,"uncomplete AS has disconnected before giving its name\n"); |
|
987 |
+ LOG(L_WARN,"uncomplete AS has disconnected before giving its name\n"); |
|
988 | 988 |
return -2; |
989 | 989 |
} |
990 | 990 |
dst[namelen]=0; |
... | ... |
@@ -1018,7 +1018,7 @@ again: |
1018 | 1018 |
if(errno==EINTR){ |
1019 | 1019 |
goto again; |
1020 | 1020 |
}else{ |
1021 |
- SLOG(L_ERR,"error while accepting connection: %s\n", strerror(errno)); |
|
1021 |
+ LOG(L_ERR,"error while accepting connection: %s\n", strerror(errno)); |
|
1022 | 1022 |
return -1; |
1023 | 1023 |
} |
1024 | 1024 |
} |
... | ... |
@@ -1026,7 +1026,7 @@ again: |
1026 | 1026 |
case 'e': |
1027 | 1027 |
for(i=0;i<MAX_UNC_AS_NR && unc_as_t[i].valid;i++); |
1028 | 1028 |
if(i==MAX_UNC_AS_NR){ |
1029 |
- SLOG(L_WARN,"no more uncomplete connections allowed\n"); |
|
1029 |
+ LOG(L_WARN,"no more uncomplete connections allowed\n"); |
|
1030 | 1030 |
goto error; |
1031 | 1031 |
} |
1032 | 1032 |
unc_as_t[i].fd=sock; |
... | ... |
@@ -1037,7 +1037,7 @@ again: |
1037 | 1037 |
case 'a': |
1038 | 1038 |
for(i=MAX_UNC_AS_NR;(i<(2*MAX_UNC_AS_NR)) && unc_as_t[i].valid;i++); |
1039 | 1039 |
if(i==2*MAX_UNC_AS_NR){ |
1040 |
- SLOG(L_WARN,"no more uncomplete connections allowed\n"); |
|
1040 |
+ LOG(L_WARN,"no more uncomplete connections allowed\n"); |
|
1041 | 1041 |
goto error; |
1042 | 1042 |
} |
1043 | 1043 |
unc_as_t[i].fd=sock; |
... | ... |
@@ -1050,7 +1050,7 @@ again: |
1050 | 1050 |
} |
1051 | 1051 |
flags=1; |
1052 | 1052 |
if ((setsockopt(sock, IPPROTO_TCP , TCP_NODELAY,&flags, sizeof(flags))<0) ){ |
1053 |
- SLOG(L_WARN, "could not disable Nagle: %s\n", |
|
1053 |
+ LOG(L_WARN, "could not disable Nagle: %s\n", |
|
1054 | 1054 |
strerror(errno)); |
1055 | 1055 |
} |
1056 | 1056 |
|
... | ... |
@@ -1066,7 +1066,7 @@ int spawn_action_dispatcher(struct as_entry *the_as) |
1066 | 1066 |
pid_t pid; |
1067 | 1067 |
pid=fork(); |
1068 | 1068 |
if(pid<0){ |
1069 |
- SLOG(L_ERR,"unable to fork an action dispatcher for %.*s\n",the_as->name.len,the_as->name.s); |
|
1069 |
+ LOG(L_ERR,"unable to fork an action dispatcher for %.*s\n",the_as->name.len,the_as->name.s); |
|
1070 | 1070 |
return -1; |
1071 | 1071 |
} |
1072 | 1072 |
if(pid==0){/*child*/ |
... | ... |
@@ -43,8 +43,8 @@ int prepare_ha() |
43 | 43 |
goto error; |
44 | 44 |
if(parse_ping(servlet_ping_config,&servlet_ping_period,&servlet_pings_lost,&servlet_ping_timeout)<0) |
45 | 45 |
goto error; |
46 |
- SLOG(L_DBG,"jain: pinging period :%d max pings lost:%d ping timeout:%d\n",jain_ping_period,jain_pings_lost,jain_ping_timeout); |
|
47 |
- SLOG(L_DBG,"servlet: pinging period:%d max pings lost:%d ping timeout:%d\n",servlet_ping_period,servlet_pings_lost,servlet_ping_timeout); |
|
46 |
+ LOG(L_DBG,"jain: pinging period :%d max pings lost:%d ping timeout:%d\n",jain_ping_period,jain_pings_lost,jain_ping_timeout); |
|
47 |
+ LOG(L_DBG,"servlet: pinging period:%d max pings lost:%d ping timeout:%d\n",servlet_ping_period,servlet_pings_lost,servlet_ping_timeout); |
|
48 | 48 |
use_ha=1; |
49 | 49 |
return 1; |
50 | 50 |
error: |
... | ... |
@@ -106,7 +106,7 @@ static inline int parse_ping(char * string,int *ping_period,int *pings_lost,int |
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
if (((*string)<'0')||((*string)>'9')) { |
109 |
- SLOG(L_ERR,"malformed ping config string. Unparseable :[%s]\n",string); |
|
109 |
+ LOG(L_ERR,"malformed ping config string. Unparseable :[%s]\n",string); |
|
110 | 110 |
return -1; |
111 | 111 |
} |
112 | 112 |
ping_period_s=string; |
... | ... |
@@ -118,14 +118,14 @@ static inline int parse_ping(char * string,int *ping_period,int *pings_lost,int |
118 | 118 |
}else if (!ping_timeout_s && (*(string+1))) { |
119 | 119 |
ping_timeout_s=string+1; |
120 | 120 |
}else{ |
121 |
- SLOG(L_ERR,"malformed ping config string. Unparseable :[%s]\n",string); |
|
121 |
+ LOG(L_ERR,"malformed ping config string. Unparseable :[%s]\n",string); |
|
122 | 122 |
return -1; |
123 | 123 |
} |
124 | 124 |
} |
125 | 125 |
string++; |
126 | 126 |
} |
127 | 127 |
if (!(ping_period_s && pings_lost_s && ping_timeout_s)) { |
128 |
- SLOG(L_ERR,"malformed ping config string. Unparseable :[%s]\n",string); |
|
128 |
+ LOG(L_ERR,"malformed ping config string. Unparseable :[%s]\n",string); |
|
129 | 129 |
return -1; |
130 | 130 |
} |
131 | 131 |
*ping_period =atoi(ping_period_s); |
... | ... |
@@ -152,7 +152,7 @@ int spawn_pinger() |
152 | 152 |
struct as_entry *as; |
153 | 153 |
|
154 | 154 |
if ((pinger_pid=fork())<0) { |
155 |
- SLOG(L_ERR,"cant fork !\n"); |
|
155 |
+ LOG(L_ERR,"cant fork !\n"); |
|
156 | 156 |
goto error; |
157 | 157 |
}else if(pinger_pid>0){ |
158 | 158 |
return 0; |
... | ... |
@@ -188,7 +188,7 @@ int spawn_pinger() |
188 | 188 |
timeout=next_jain<next_servlet?next_jain:next_servlet; |
189 | 189 |
|
190 | 190 |
if ((n=poll(NULL,0,timeout<0?0:timeout))<0) { |
191 |
- SLOG(L_ERR,"poll returned %d\n",n); |
|
191 |
+ LOG(L_ERR,"poll returned %d\n",n); |
|
192 | 192 |
goto error; |
193 | 193 |
}else if(n==0){/*timeout*/ |
194 | 194 |
gettimeofday(&now,NULL); |
... | ... |
@@ -209,7 +209,7 @@ int spawn_pinger() |
209 | 209 |
} |
210 | 210 |
} |
211 | 211 |
}else{/*impossible..*/ |
212 |
- SLOG(L_ERR,"bug:poll returned %d\n",n); |
|
212 |
+ LOG(L_ERR,"bug:poll returned %d\n",n); |
|
213 | 213 |
goto error; |
214 | 214 |
} |
215 | 215 |
} |
... | ... |
@@ -237,12 +237,12 @@ static inline int send_ping(struct as_entry *the_as,struct timeval *now) |
237 | 237 |
the_ping=(char *)0; |
238 | 238 |
retval=0; |
239 | 239 |
if (!(aping=shm_malloc(sizeof(as_msg_t)))) { |
240 |
- SLOG(L_ERR,"out of shm_mem for ping event\n"); |
|
240 |
+ LOG(L_ERR,"out of shm_mem for ping event\n"); |
|
241 | 241 |
retval=-1; |
242 | 242 |
goto error; |
243 | 243 |
} |
244 | 244 |
if (!(the_ping=create_ping_event(&pinglen,0,&seqno))) { |
245 |
- SLOG(L_ERR,"Unable to create ping event\n"); |
|
245 |
+ LOG(L_ERR,"Unable to create ping event\n"); |
|
246 | 246 |
retval=-1; |
247 | 247 |
goto error; |
248 | 248 |
} |
... | ... |
@@ -253,7 +253,7 @@ static inline int send_ping(struct as_entry *the_as,struct timeval *now) |
253 | 253 |
lock_get(the_as->u.as.jain_pings.mutex); |
254 | 254 |
{ |
255 | 255 |
if(the_as->u.as.jain_pings.count==the_as->u.as.jain_pings.size){ |
256 |
- SLOG(L_ERR,"Cant send ping because the pingtable is full (%d pings)\n",\ |
|
256 |
+ LOG(L_ERR,"Cant send ping because the pingtable is full (%d pings)\n",\ |
|
257 | 257 |
the_as->u.as.jain_pings.count); |
258 | 258 |
retval=0; |
259 | 259 |
lock_release(the_as->u.as.jain_pings.mutex); |
... | ... |
@@ -272,7 +272,7 @@ again: |
272 | 272 |
if(errno==EINTR){ |
273 | 273 |
goto again; |
274 | 274 |
}else{ |
275 |
- SLOG(L_ERR,"error sending ping\n"); |
|
275 |
+ LOG(L_ERR,"error sending ping\n"); |
|
276 | 276 |
goto error; |
277 | 277 |
} |
278 | 278 |
} |
... | ... |
@@ -303,13 +303,13 @@ inline int init_pingtable(struct ha *table,int timeout,int maxpings) |
303 | 303 |
table->timeout=timeout; |
304 | 304 |
|
305 | 305 |
if (!(table->mutex=lock_alloc())){ |
306 |
- SLOG(L_ERR,"Unable to allocate a lock for the ping table\n"); |
|
306 |
+ LOG(L_ERR,"Unable to allocate a lock for the ping table\n"); |
|
307 | 307 |
goto error; |
308 | 308 |
}else |
309 | 309 |
lock_init(table->mutex); |
310 |
- SLOG(L_ERR,"alloc'ing %d bytes for %d pings\n",(maxpings*sizeof(struct ping)),maxpings); |
|
310 |
+ LOG(L_ERR,"alloc'ing %d bytes for %d pings\n",(int)(maxpings*sizeof(struct ping)),maxpings); |
|
311 | 311 |
if (0==(table->pings=shm_malloc(maxpings*sizeof(struct ping)))){ |
312 |
- SLOG(L_ERR,"Unable to shm_malloc %d bytes for %d pings\n",(maxpings*sizeof(struct ping)),maxpings); |
|
312 |
+ LOG(L_ERR,"Unable to shm_malloc %d bytes for %d pings\n",(int)(maxpings*sizeof(struct ping)),maxpings); |
|
313 | 313 |
goto error; |
314 | 314 |
}else{ |
315 | 315 |
memset(table->pings,0,(maxpings*sizeof(struct ping))); |
... | ... |
@@ -353,7 +353,7 @@ char * create_ping_event(int *evt_len,int flags,unsigned int *seqno) |
353 | 353 |
static unsigned int ping_seqno=0; |
354 | 354 |
|
355 | 355 |
if (!(buffer=shm_malloc(4+1+1+4+4))) { |
356 |
- SLOG(L_ERR,"out of shm for ping\n"); |
|
356 |
+ LOG(L_ERR,"out of shm for ping\n"); |
|
357 | 357 |
return 0; |
358 | 358 |
} |
359 | 359 |
*evt_len=(4+1+1+4+4); |
... | ... |
@@ -119,12 +119,12 @@ static int fixup_as_relay(void** param, int param_no) |
119 | 119 |
} |
120 | 120 |
if (!(*entry)) { |
121 | 121 |
if (!(*entry=(struct as_entry *)shm_malloc(sizeof(struct as_entry)))) { |
122 |
- SLOG(L_ERR,"Out of shm_mem\n"); |
|
122 |
+ LOG(L_ERR,"Out of shm_mem\n"); |
|
123 | 123 |
goto error; |
124 | 124 |
} |
125 | 125 |
memset(*entry,0,sizeof(struct as_entry)); |
126 | 126 |
if(!((*entry)->name.s=shm_malloc(len))){ |
127 |
- SLOG(L_ERR,"Out of mem\n"); |
|
127 |
+ LOG(L_ERR,"Out of mem\n"); |
|
128 | 128 |
goto error; |
129 | 129 |
} |
130 | 130 |
(*entry)->name.len=len; |
... | ... |
@@ -136,7 +136,7 @@ static int fixup_as_relay(void** param, int param_no) |
136 | 136 |
*param=*entry; |
137 | 137 |
} |
138 | 138 |
for (tmp=as_list;tmp;tmp=tmp->next) |
139 |
- SLOG(L_DBG,"%.*s\n",tmp->name.len,tmp->name.s); |
|
139 |
+ LOG(L_DBG,"%.*s\n",tmp->name.len,tmp->name.s); |
|
140 | 140 |
return 1; |
141 | 141 |
error: |
142 | 142 |
return -1; |
... | ... |
@@ -154,7 +154,7 @@ void seas_sighandler(int signo) |
154 | 154 |
case SIGPIPE: |
155 | 155 |
if(is_dispatcher) |
156 | 156 |
return; |
157 |
- SLOG(L_INFO,"%s exiting\n",whoami); |
|
157 |
+ LOG(L_INFO,"%s exiting\n",whoami); |
|
158 | 158 |
if(my_as->u.as.ac_buffer.s){ |
159 | 159 |
pkg_free(my_as->u.as.ac_buffer.s); |
160 | 160 |
my_as->u.as.ac_buffer.s=0; |
... | ... |
@@ -166,18 +166,18 @@ void seas_sighandler(int signo) |
166 | 166 |
exit(0); |
167 | 167 |
break; |
168 | 168 |
case SIGCHLD: |
169 |
- SLOG(L_INFO,"Child stopped or terminated\n"); |
|
169 |
+ LOG(L_INFO,"Child stopped or terminated\n"); |
|
170 | 170 |
break; |
171 | 171 |
case SIGUSR1: |
172 | 172 |
case SIGUSR2: |
173 |
- SLOG(memlog,"Memory status (pkg):\n"); |
|
173 |
+ LOG(memlog,"Memory status (pkg):\n"); |
|
174 | 174 |
#ifdef PKG_MALLOC |
175 | 175 |
pkg_status(); |
176 | 176 |
#endif |
177 | 177 |
break; |
178 | 178 |
case SIGINT: |
179 | 179 |
case SIGTERM: |
180 |
- SLOG(L_INFO,"INFO: signal %d received\n",signo); |
|
180 |
+ LOG(L_INFO,"INFO: signal %d received\n",signo); |
|
181 | 181 |
#ifdef PKG_MALLOC |
182 | 182 |
pkg_status(); |
183 | 183 |
#endif |
... | ... |
@@ -189,7 +189,7 @@ void seas_sighandler(int signo) |
189 | 189 |
while(wait(0) > 0); |
190 | 190 |
exit(0); |
191 | 191 |
}else{ |
192 |
- SLOG(L_INFO,"%s exiting\n",whoami); |
|
192 |
+ LOG(L_INFO,"%s exiting\n",whoami); |
|
193 | 193 |
if(my_as && my_as->u.as.ac_buffer.s) |
194 | 194 |
pkg_free(my_as->u.as.ac_buffer.s); |
195 | 195 |
if(my_as && my_as->u.as.action_fd!=-1) |
... | ... |
@@ -235,43 +235,43 @@ static int w_as_relay_t(struct sip_msg *msg, char *entry, char *foo) |
235 | 235 |
/*new transaction created, let's pass it to an APP SERVER*/ |
236 | 236 |
if (msg->REQ_METHOD==METHOD_INVITE ) |
237 | 237 |
{ |
238 |
- SLOG(L_DBG,"new INVITE\n"); |
|
238 |
+ LOG(L_DBG,"new INVITE\n"); |
|
239 | 239 |
if(!seas_f.tmb.t_reply(msg,100,&msg100)){ |
240 |
- SLOG(L_DBG,"t_reply (100)\n"); |
|
240 |
+ LOG(L_DBG,"t_reply (100)\n"); |
|
241 | 241 |
goto error; |
242 | 242 |
} |
243 | 243 |
} |
244 | 244 |
as=(struct as_entry *)entry; |
245 | 245 |
if(!as->connected){ |
246 |
- SLOG(L_ERR,"app server %.*s not connected\n",as->name.len,as->name.s); |
|
246 |
+ LOG(L_ERR,"app server %.*s not connected\n",as->name.len,as->name.s); |
|
247 | 247 |
goto error; |
248 | 248 |
} |
249 | 249 |
if(as->type==AS_TYPE){ |
250 | 250 |
if((processor_id=get_processor_id(&msg->rcv,&(as->u.as)))<0){ |
251 |
- SLOG(L_ERR,"no processor found for packet with dst port:%d\n",msg->rcv.dst_port); |
|
251 |
+ LOG(L_ERR,"no processor found for packet with dst port:%d\n",msg->rcv.dst_port); |
|
252 | 252 |
goto error; |
253 | 253 |
} |
254 | 254 |
}else if(as->type==CLUSTER_TYPE){ |
255 |
- SLOG(L_ERR,"clustering not fully implemented\n"); |
|
255 |
+ LOG(L_ERR,"clustering not fully implemented\n"); |
|
256 | 256 |
return 0; |
257 | 257 |
}else{ |
258 |
- SLOG(L_ERR,"unknown type of as (neither cluster nor as)\n"); |
|
258 |
+ LOG(L_ERR,"unknown type of as (neither cluster nor as)\n"); |
|
259 | 259 |
return -1; |
260 | 260 |
} |
261 |
- SLOG(L_DBG,"as found ! (%.*s) processor id = %d\n",as->name.len,as->name.s,processor_id); |
|
261 |
+ LOG(L_DBG,"as found ! (%.*s) processor id = %d\n",as->name.len,as->name.s,processor_id); |
|
262 | 262 |
if(new_tran==1 && msg->REQ_METHOD==METHOD_ACK){ |
263 | 263 |
/* core should forward statelessly (says t_newtran)*/ |
264 |
- SLOG(L_DBG,"forwarding statelessly !!!\n"); |
|
264 |
+ LOG(L_DBG,"forwarding statelessly !!!\n"); |
|
265 | 265 |
if(!(buffer=create_as_event_sl(msg,processor_id,&len,0))){ |
266 |
- SLOG(L_ERR,"create_as_event_sl() unable to create event code\n"); |
|
266 |
+ LOG(L_ERR,"create_as_event_sl() unable to create event code\n"); |
|
267 | 267 |
goto error; |
268 | 268 |
} |
269 | 269 |
}else if(!(buffer=create_as_event_t(seas_f.tmb.t_gett(),msg,processor_id,&len,0))){ |
270 |
- SLOG(L_ERR,"unable to create event code\n"); |
|
270 |
+ LOG(L_ERR,"unable to create event code\n"); |
|
271 | 271 |
goto error; |
272 | 272 |
} |
273 | 273 |
if(!(my_as_ev=shm_malloc(sizeof(as_msg_t)))){ |
274 |
- SLOG(L_ERR,"Out of shared mem!\n"); |
|
274 |
+ LOG(L_ERR,"Out of shared mem!\n"); |
|
275 | 275 |
goto error; |
276 | 276 |
} |
277 | 277 |
my_as_ev->msg = buffer; |
... | ... |
@@ -287,7 +287,7 @@ again: |
287 | 287 |
if(errno==EINTR) |
288 | 288 |
goto again; |
289 | 289 |
else if(errno==EPIPE){ |
290 |
- SLOG(L_ERR,"SEAS Event Dispatcher has closed the pipe. Invalidating it !\n"); |
|
290 |
+ LOG(L_ERR,"SEAS Event Dispatcher has closed the pipe. Invalidating it !\n"); |
|
291 | 291 |
goto error; |
292 | 292 |
/** TODO handle this correctly !!!*/ |
293 | 293 |
} |
... | ... |
@@ -300,7 +300,7 @@ error: |
300 | 300 |
mycel=seas_f.tmb.t_gett(); |
301 | 301 |
if(mycel && mycel!=T_UNDEFINED){ |
302 | 302 |
if(!seas_f.tmb.t_reply(msg,500,&msg500)){ |
303 |
- SLOG(L_ERR,"t_reply (500)\n"); |
|
303 |
+ LOG(L_ERR,"t_reply (500)\n"); |
|
304 | 304 |
} |
305 | 305 |
} |
306 | 306 |
if(my_as_ev) |
... | ... |
@@ -326,20 +326,20 @@ static int w_as_relay_sl(struct sip_msg *msg, char *as_name, char *foo) |
326 | 326 |
|
327 | 327 |
if(as->type==AS_TYPE){ |
328 | 328 |
if((processor_id=get_processor_id(&msg->rcv,&(as->u.as)))<0){ |
329 |
- SLOG(L_ERR,"no processor found for packet with dst port:%d\n",msg->rcv.dst_port); |
|
329 |
+ LOG(L_ERR,"no processor found for packet with dst port:%d\n",msg->rcv.dst_port); |
|
330 | 330 |
goto error; |
331 | 331 |
} |
332 | 332 |
}else if (as->type==CLUSTER_TYPE) { |
333 |
- SLOG(L_ERR,"clustering not fully implemented\n"); |
|
333 |
+ LOG(L_ERR,"clustering not fully implemented\n"); |
|
334 | 334 |
goto error; |
335 | 335 |
}else{ |
336 |
- SLOG(L_ERR,"unknown type of as\n"); |
|
336 |
+ LOG(L_ERR,"unknown type of as\n"); |
|
337 | 337 |
goto error; |
338 | 338 |
} |
339 | 339 |
|
340 |
- SLOG(L_DBG,"as found ! (%.*s) processor id = %d\n",as->name.len,as->name.s,processor_id); |
|
340 |
+ LOG(L_DBG,"as found ! (%.*s) processor id = %d\n",as->name.len,as->name.s,processor_id); |
|
341 | 341 |
if(!(buffer=create_as_event_sl(msg,processor_id,&len,0))){ |
342 |
- SLOG(L_ERR,"unable to create event code\n"); |
|
342 |
+ LOG(L_ERR,"unable to create event code\n"); |
|
343 | 343 |
goto error; |
344 | 344 |
} |
345 | 345 |
if(!(my_as_ev=shm_malloc(sizeof(as_msg_t)))) |
... | ... |
@@ -357,7 +357,7 @@ again: |
357 | 357 |
if(errno==EINTR) |
358 | 358 |
goto again; |
359 | 359 |
else if(errno==EPIPE){ |
360 |
- SLOG(L_ERR,"SEAS Event Dispatcher has closed the pipe. Invalidating it !\n"); |
|
360 |
+ LOG(L_ERR,"SEAS Event Dispatcher has closed the pipe. Invalidating it !\n"); |
|
361 | 361 |
return -2; |
362 | 362 |
/** TODO handle this correctly !!!*/ |
363 | 363 |
} |
... | ... |
@@ -407,7 +407,7 @@ char * create_as_event_t(struct cell *t,struct sip_msg *msg,char processor_id,in |
407 | 407 |
originalT=0; |
408 | 408 |
|
409 | 409 |
if(!(buffer=shm_malloc(ENCODED_MSG_SIZE))){ |
410 |
- SLOG(L_ERR,"Out Of Memory !!\n"); |
|
410 |
+ LOG(L_ERR,"Out Of Memory !!\n"); |
|
411 | 411 |
return 0; |
412 | 412 |
} |
413 | 413 |
*evt_len=0; |
... | ... |
@@ -416,7 +416,7 @@ char * create_as_event_t(struct cell *t,struct sip_msg *msg,char processor_id,in |
416 | 416 |
label=t->label; |
417 | 417 |
}else{ |
418 | 418 |
/**seas_f.tmb.t_get_trans_ident(msg,&hash_index,&label); this is bad, because it ref-counts !!!*/ |
419 |
- SLOG(L_ERR,"no transaction provided...\n"); |
|
419 |
+ LOG(L_ERR,"no transaction provided...\n"); |
|
420 | 420 |
goto error; |
421 | 421 |
} |
422 | 422 |
|
... | ... |
@@ -429,17 +429,17 @@ char * create_as_event_t(struct cell *t,struct sip_msg *msg,char processor_id,in |
429 | 429 |
if(is_e2e_ack(t,msg)){ |
430 | 430 |
flags|=E2E_ACK; |
431 | 431 |
}else if(msg->REQ_METHOD==METHOD_CANCEL){ |
432 |
- SLOG(L_DBG,"new CANCEL\n"); |
|
432 |
+ LOG(L_DBG,"new CANCEL\n"); |
|
433 | 433 |
originalT=seas_f.tmb.t_lookup_original_t(msg); |
434 | 434 |
if(!originalT || originalT==T_UNDEFINED){ |
435 | 435 |
/** we dont even pass the unknown CANCEL to JAIN*/ |
436 |
- SLOG(L_WARN,"CANCEL does not match any existing transaction!!\n"); |
|
436 |
+ LOG(L_WARN,"CANCEL does not match any existing transaction!!\n"); |
|
437 | 437 |
goto error; |
438 | 438 |
}else{ |
439 | 439 |
flags|=CANCEL_FOUND; |
440 | 440 |
seas_f.tmb.unref_cell(originalT); |
441 | 441 |
} |
442 |
- SLOG(L_DBG,"Cancelling transaction !!\n"); |
|
442 |
+ LOG(L_DBG,"Cancelling transaction !!\n"); |
|
443 | 443 |
} |
444 | 444 |
flags=htonl(flags); |
445 | 445 |
memcpy(buffer+k,&flags,4); |
... | ... |
@@ -473,7 +473,7 @@ char * create_as_event_t(struct cell *t,struct sip_msg *msg,char processor_id,in |
473 | 473 |
memcpy(buffer+k,&i,4); |
474 | 474 |
k+=4; |
475 | 475 |
if(msg->REQ_METHOD==METHOD_CANCEL && originalT){ |
476 |
- SLOG(L_DBG,"Cancelled transaction: Hash_Index=%d, Label=%d\n",originalT->hash_index,originalT->label); |
|
476 |
+ LOG(L_DBG,"Cancelled transaction: Hash_Index=%d, Label=%d\n",originalT->hash_index,originalT->label); |
|
477 | 477 |
/*hash_index*/ |
478 | 478 |
i=htonl(originalT->hash_index); |
479 | 479 |
memcpy(buffer+k,&i,4); |
... | ... |
@@ -486,7 +486,7 @@ char * create_as_event_t(struct cell *t,struct sip_msg *msg,char processor_id,in |
486 | 486 |
|
487 | 487 |
/*length of event (hdr+payload-4), copied at the beginning*/ |
488 | 488 |
if(encode_msg(msg,buffer+k,ENCODED_MSG_SIZE-k)<0){ |
489 |
- SLOG(L_ERR,"Unable to encode msg\n"); |
|
489 |
+ LOG(L_ERR,"Unable to encode msg\n"); |
|
490 | 490 |
goto error; |
491 | 491 |
} |
492 | 492 |
i = GET_PAY_SIZE(buffer+k); |
... | ... |
@@ -525,7 +525,7 @@ char * create_as_event_sl(struct sip_msg *msg,char processor_id,int *evt_len,int |
525 | 525 |
char *buffer=NULL; |
526 | 526 |
|
527 | 527 |
if(!(buffer=shm_malloc(ENCODED_MSG_SIZE))){ |
528 |
- SLOG(L_ERR,"create_as_event_t Out Of Memory !!\n"); |
|
528 |
+ LOG(L_ERR,"create_as_event_t Out Of Memory !!\n"); |
|
529 | 529 |
return 0; |
530 | 530 |
} |
531 | 531 |
*evt_len=0; |
... | ... |
@@ -562,7 +562,7 @@ char * create_as_event_sl(struct sip_msg *msg,char processor_id,int *evt_len,int |
562 | 562 |
k+=2; |
563 | 563 |
/*length of event (hdr+payload-4), copied at the beginning*/ |
564 | 564 |
if(encode_msg(msg,buffer+k,ENCODED_MSG_SIZE-k)<0){ |
565 |
- SLOG(L_ERR,"Unable to encode msg\n"); |
|
565 |
+ LOG(L_ERR,"Unable to encode msg\n"); |
|
566 | 566 |
goto error; |
567 | 567 |
} |
568 | 568 |
i = GET_PAY_SIZE(buffer+k); |
... | ... |
@@ -599,11 +599,11 @@ static int seas_init(void) |
599 | 599 |
int c_pipe[2],mierr,i; |
600 | 600 |
/** Populate seas_functions*/ |
601 | 601 |
if (load_tm_api(&seas_f.tmb)!=0) { |
602 |
- SLOG(L_ERR, "can't load TM API\n"); |
|
602 |
+ LOG(L_ERR, "can't load TM API\n"); |
|
603 | 603 |
return -1; |
604 | 604 |
} |
605 | 605 |
if(!(seas_f.t_check_orig_trans = find_export("t_check_trans", 0, 0))){ |
606 |
- SLOG(L_ERR, "Seas requires transaction module (t_check_trans not found)\n"); |
|
606 |
+ LOG(L_ERR, "Seas requires transaction module (t_check_trans not found)\n"); |
|
607 | 607 |
return -1; |
608 | 608 |
} |
609 | 609 |
/** Populate seas_functions*/ |
... | ... |
@@ -630,13 +630,13 @@ static int seas_init(void) |
630 | 630 |
goto error; |
631 | 631 |
hostent2ip_addr(seas_listen_ip, he, 0); |
632 | 632 |
if(port!=(char *)0 && (seas_listen_port=str2s(port,strlen(port),&mierr))==0){ |
633 |
- SLOG(L_ERR,"invalid port %s \n",port); |
|
633 |
+ LOG(L_ERR,"invalid port %s \n",port); |
|
634 | 634 |
goto error; |
635 | 635 |
} |
636 | 636 |
} |
637 | 637 |
memset(unc_as_t,0,2*MAX_UNC_AS_NR*sizeof(struct unc_as));//useless because unc_as_t is in bss? |
638 | 638 |
if (pipe(c_pipe)==-1) { |
639 |
- SLOG(L_ERR,"cannot create pipe!\n"); |
|
639 |
+ LOG(L_ERR,"cannot create pipe!\n"); |
|
640 | 640 |
goto error; |
641 | 641 |
} |
642 | 642 |
read_pipe=c_pipe[0]; |
... | ... |
@@ -666,7 +666,7 @@ error: |
666 | 666 |
static void seas_init_tags() |
667 | 667 |
{ |
668 | 668 |
init_tags(seas_tags, &seas_tag_suffix,"VozTele-Seas/tags",'-'); |
669 |
- SLOG(L_DBG,"seas_init_tags, seas_tags=%s\n",seas_tags); |
|
669 |
+ LOG(L_DBG,"seas_init_tags, seas_tags=%s\n",seas_tags); |
|
670 | 670 |
} |
671 | 671 |
|
672 | 672 |
/** |
... | ... |
@@ -688,7 +688,7 @@ static int seas_child_init(int rank) |
688 | 688 |
return 0; |
689 | 689 |
} |
690 | 690 |
if ((pid=fork())<0) { |
691 |
- SLOG(L_ERR,"cannot fork \n"); |
|
691 |
+ LOG(L_ERR,"cannot fork \n"); |
|
692 | 692 |
return -1; |
693 | 693 |
} |
694 | 694 |
if (!pid) { |
... | ... |
@@ -52,7 +52,8 @@ |
52 | 52 |
(index)+=4; \ |
53 | 53 |
}while(0); |
54 | 54 |
|
55 |
-#define SLOG(leve,format, ...) LOG(leve,"seas-%s:%s:"format,leve==4?"DBG":leve==3?"INF":leve==2?"NTC":leve==1?"WRN":leve==-1?"ERR":leve==-2?"CRT":leve==-3?"ALT":"UNK",__FUNCTION__,##__VA_ARGS__) |
|
55 |
+/*#define LOG(leve,format, ...) LOG(leve,__VA_ARGS__) |
|
56 |
+LOG(leve,"seas-%s:%s:"format,leve==4?"DBG":leve==3?"INF":leve==2?"NTC":leve==1?"WRN":leve==-1?"ERR":leve==-2?"CRT":leve==-3?"ALT":"UNK",__FUNCTION__,##__VA_ARGS__)*/ |
|
56 | 57 |
|
57 | 58 |
|
58 | 59 |
extern char use_stats; |
... | ... |
@@ -77,7 +77,7 @@ int dispatch_actions() |
77 | 77 |
struct timeval last,now; |
78 | 78 |
|
79 | 79 |
/* now the process_no is set, I delete the pt (process_table) global var, because it confuses |
80 |
- * SLOG() */ |
|
80 |
+ * LOG() */ |
|
81 | 81 |
pt=0; |
82 | 82 |
fd=my_as->u.as.action_fd; |
83 | 83 |
fds[0].fd=fd; |
... | ... |
@@ -93,7 +93,7 @@ int dispatch_actions() |
93 | 93 |
ktimeout=servlet_ping_timeout; |
94 | 94 |
/*ac_buffer is pkg_malloc because only this process (action dispatcher) will use it*/ |
95 | 95 |
if((my_as->u.as.ac_buffer.s = pkg_malloc(AS_BUF_SIZE))==0){ |
96 |
- SLOG(L_ERR,"unable to alloc pkg mem for the action buffer\n"); |
|
96 |
+ LOG(L_ERR,"unable to alloc pkg mem for the action buffer\n"); |
|
97 | 97 |
return -1; |
98 | 98 |
} |
99 | 99 |
my_as->u.as.ac_buffer.len=0; |
... | ... |
@@ -107,9 +107,9 @@ int dispatch_actions() |
107 | 107 |
gettimeofday(&last,NULL); |
108 | 108 |
continue; |
109 | 109 |
}else if(errno==EBADF){ |
110 |
- SLOG(L_ERR,"EBADF !!\n"); |
|
110 |
+ LOG(L_ERR,"EBADF !!\n"); |
|
111 | 111 |
}else{ |
112 |
- SLOG(L_ERR,"on poll\n"); |
|
112 |
+ LOG(L_ERR,"on poll\n"); |
|
113 | 113 |
} |
114 | 114 |
}else if(n==0){/*timeout*/ |
115 | 115 |
if (0>(ret=process_pings(&my_as->u.as.jain_pings))) { |
... | ... |
@@ -152,12 +152,12 @@ again: |
152 | 152 |
if(0>(j=read(fd,my_as->u.as.ac_buffer.s+my_as->u.as.ac_buffer.len,k))){ |
153 | 153 |
if(errno==EINTR) |
154 | 154 |
goto again; |
155 |
- SLOG(L_ERR,"reading data for as %.*s (%s)\n",my_as->name.len,my_as->name.s,strerror(errno)); |
|
155 |
+ LOG(L_ERR,"reading data for as %.*s (%s)\n",my_as->name.len,my_as->name.s,strerror(errno)); |
|
156 | 156 |
return -1; |
157 | 157 |
}else if(j==0){ |
158 | 158 |
pkg_free(my_as->u.as.ac_buffer.s); |
159 | 159 |
close(fd); |
160 |
- SLOG(L_ERR,"read 0 bytes from AS:%.*s\n",my_as->name.len,my_as->name.s); |
|
160 |
+ LOG(L_ERR,"read 0 bytes from AS:%.*s\n",my_as->name.len,my_as->name.s); |
|
161 | 161 |
/** we return, so we will exit, so our parent (Event Dispatcher) will receive a sigchld and know |
162 | 162 |
* it should tear down the corresponding AS |
163 | 163 |
* what still is not clear is what will happen to events that were put in the pipe... |
... | ... |
@@ -165,12 +165,12 @@ again: |
165 | 165 |
return -2; |
166 | 166 |
} |
167 | 167 |
(my_as->u.as.ac_buffer.len)+=j; |
168 |
- SLOG(L_DBG,"read %d bytes from AS action socket (total = %d)\n",j,my_as->u.as.ac_buffer.len); |
|
168 |
+ LOG(L_DBG,"read %d bytes from AS action socket (total = %d)\n",j,my_as->u.as.ac_buffer.len); |
|
169 | 169 |
if(use_stats) |
170 | 170 |
receivedplus(); |
171 | 171 |
if(my_as->u.as.ac_buffer.len>5){ |
172 | 172 |
process_action(&my_as->u.as); |
173 |
- SLOG(L_DBG,"(Action dispatched,buffer.len=%d)\n",my_as->u.as.ac_buffer.len); |
|
173 |
+ LOG(L_DBG,"(Action dispatched,buffer.len=%d)\n",my_as->u.as.ac_buffer.len); |
|
174 | 174 |
} |
175 | 175 |
return 0; |
176 | 176 |
} |
... | ... |
@@ -207,7 +207,7 @@ static inline int process_pings(struct ha *the_table) |
207 | 207 |
tmp=the_table->pings+k; |
208 | 208 |
elapsed=(now.tv_sec-tmp->sent.tv_sec)*1000+(now.tv_usec-tmp->sent.tv_usec)/1000; |
209 | 209 |
if(elapsed>the_table->timeout){ |
210 |
- SLOG(L_DBG,"ping timed out %d\n",tmp->id); |
|
210 |
+ LOG(L_DBG,"ping timed out %d\n",tmp->id); |
|
211 | 211 |
the_table->timed_out_pings++; |
212 | 212 |
}else{ |
213 | 213 |
the_table->begin=k; |
... | ... |
@@ -232,18 +232,18 @@ static inline void set_process_no() |
232 | 232 |
for(i=0;i<pcnt;i++){ |
233 | 233 |
if(pt[i].pid==fifo_pid){ |
234 | 234 |
process_no=i; |
235 |
- SLOG(L_DBG,"Setting fake process_no to %d (fifo pid=%d)\n",i,fifo_pid); |
|
235 |
+ LOG(L_DBG,"Setting fake process_no to %d (fifo pid=%d)\n",i,fifo_pid); |
|
236 | 236 |
return; |
237 | 237 |
} |
238 | 238 |
} |
239 | 239 |
for(i=0;i<pcnt;i++){ |
240 | 240 |
if(!memcmp(pt[i].desc,"unix domain socket server",26)){ |
241 | 241 |
process_no=i; |
242 |
- SLOG(L_DBG,"Setting fake process_no to %d\n",i); |
|
242 |
+ LOG(L_DBG,"Setting fake process_no to %d\n",i); |
|
243 | 243 |
return; |
244 | 244 |
} |
245 | 245 |
} |
246 |
- SLOG(L_ERR,"unable to fake process_no\n"); |
|
246 |
+ LOG(L_ERR,"unable to fake process_no\n"); |
|
247 | 247 |
} |
248 | 248 |
*/ |
249 | 249 |
|
... | ... |
@@ -262,35 +262,35 @@ int process_action(as_p the_as) |
262 | 262 |
if(use_stats) |
263 | 263 |
stats_reply(); |
264 | 264 |
if(ac_len>AS_BUF_SIZE){ |
265 |
- SLOG(L_WARN,"BUG:Action too big (%d)!!! should be skipped and an error returned!\n",ac_len); |
|
265 |
+ LOG(L_WARN,"BUG:Action too big (%d)!!! should be skipped and an error returned!\n",ac_len); |
|
266 | 266 |
return -1; |
267 | 267 |
} |
268 | 268 |
while (the_as->ac_buffer.len>=ac_len) { |
269 |
- SLOG(L_DBG,"Processing action %d bytes long\n",ac_len); |
|
269 |
+ LOG(L_DBG,"Processing action %d bytes long\n",ac_len); |
|
270 | 270 |
switch(the_as->ac_buffer.s[4]){ |
271 | 271 |
case REPLY_PROV: |
272 | 272 |
case REPLY_FIN: |
273 |
- SLOG(L_DBG,"Processing a REPLY action from AS (length=%d): %.*s\n",ac_len,the_as->name.len,the_as->name.s); |
|
273 |
+ LOG(L_DBG,"Processing a REPLY action from AS (length=%d): %.*s\n",ac_len,the_as->name.len,the_as->name.s); |
|
274 | 274 |
ac_reply(the_as,the_as->ac_buffer.s+5,ac_len-5); |
275 | 275 |
break; |
276 | 276 |
case UAC_REQ: |
277 |