Browse code

- workaround to avoid the usage of daylight var. which is linux specific

Bogdan-Andrei Iancu authored on 13/11/2003 20:48:34
Showing 2 changed files
... ...
@@ -507,9 +507,6 @@ static int cpl_invoke_script(struct sip_msg* msg, char* str1, char* str2)
507 507
 	str  loc;
508 508
 	str  script;
509 509
 
510
-	//script.s = 0;
511
-	//cpl_intr = 0;
512
-
513 510
 	/* get the user_name */
514 511
 	if ( ((unsigned int)str1)&CPL_RUN_INCOMING ) {
515 512
 		/* if it's incoming -> get the destination user name */
... ...
@@ -527,9 +524,10 @@ static int cpl_invoke_script(struct sip_msg* msg, char* str1, char* str2)
527 524
 
528 525
 	/* has the user a non-empty script? if not, return normaly, allowing ser to
529 526
 	 * continue its script */
530
-	if ( !script.s || !script.len )
527
+	if ( !script.s || !script.len ) {
531 528
 		shm_free(user.s);
532 529
 		return 1;
530
+	}
533 531
 
534 532
 	/* build a new script interpreter */
535 533
 	if ( (cpl_intr=new_cpl_interpreter(msg,&script))==0 )
... ...
@@ -585,7 +585,7 @@ time_t ic_parse_datetime(char *_in, struct tm *_tm)
585 585
 	_tm->tm_hour = _D(_in[9])*10 + _D(_in[10]);
586 586
 	_tm->tm_min = _D(_in[11])*10 + _D(_in[12]);
587 587
 	_tm->tm_sec = _D(_in[13])*10 + _D(_in[14]);
588
-	_tm->tm_isdst = daylight;
588
+	_tm->tm_isdst = -1 /*daylight*/;
589 589
 	return mktime(_tm);
590 590
 }
591 591
 
... ...
@@ -1194,7 +1194,7 @@ int check_byxxx(tmrec_p _trp, ac_tm_p _atp)
1194 1194
 			if(_trp->freq==FREQ_YEARLY)
1195 1195
 			{
1196 1196
 #ifdef EXTRA_DEBUG
1197
-				printf("Req:byday:y: %d==%d && %d==%d\n", _atp->t.tm_wday,
1197
+				DBG("Req:byday:y: %d==%d && %d==%d\n", _atp->t.tm_wday,
1198 1198
 					_trp->byday->xxx[i], _atp->ywday+1, 
1199 1199
 					(_trp->byday->req[i]+_amp->ywday)%_amp->ywday);
1200 1200
 #endif
... ...
@@ -1208,7 +1208,7 @@ int check_byxxx(tmrec_p _trp, ac_tm_p _atp)
1208 1208
 				if(_trp->freq==FREQ_MONTHLY)
1209 1209
 				{
1210 1210
 #ifdef EXTRA_DEBUG
1211
-					printf("Req:byday:m: %d==%d && %d==%d\n", _atp->t.tm_wday,
1211
+					DBG("Req:byday:m: %d==%d && %d==%d\n", _atp->t.tm_wday,
1212 1212
 						_trp->byday->xxx[i], _atp->mwday+1, 
1213 1213
 						(_trp->byday->req[i]+_amp->mwday)%_amp->mwday);
1214 1214
 #endif