Changeset 8025
Legend:
- Unmodified
- Added
- Removed
-
trunk/README
r7517 r8025 7 7 8 8 OSCam: Open Source CAM 9 Copyright (C) 2009-201 2OSCam developers9 Copyright (C) 2009-2013 OSCam developers 10 10 11 11 OSCam is based on the Streamboard mp-cardserver 0.9d by dukat and -
trunk/globals.h
r7999 r8025 1754 1754 extern pthread_key_t getclient; 1755 1755 extern struct s_client *first_client; 1756 extern CS_MUTEX_LOCK config_lock; 1756 1757 extern CS_MUTEX_LOCK clientlist_lock; 1757 1758 extern CS_MUTEX_LOCK readerlist_lock; -
trunk/oscam-config.c
r8004 r8025 7 7 #include "oscam-files.h" 8 8 #include "oscam-garbage.h" 9 #include "oscam-lock.h" 9 10 #include "oscam-string.h" 10 11 #include "oscam-time.h" … … 438 439 } 439 440 441 cs_writelock(&config_lock); 440 442 //this allows reloading of srvids, so cleanup of old data is needed: 441 443 memcpy(last_srvid, cfg.srvid, sizeof(last_srvid)); //old data … … 455 457 } 456 458 } 459 cs_writeunlock(&config_lock); 457 460 458 461 return(0); … … 521 524 cs_log("%s loading failed", cs_trid); 522 525 } 523 526 cs_writelock(&config_lock); 524 527 //reload function: 525 528 tierid = cfg.tierid; … … 531 534 tierid = ptr; 532 535 } 536 cs_writeunlock(&config_lock); 533 537 534 538 return(0); -
trunk/oscam.c
r8015 r8025 61 61 pid_t server_pid=0; 62 62 CS_MUTEX_LOCK system_lock; 63 CS_MUTEX_LOCK config_lock; 63 64 CS_MUTEX_LOCK gethostbyname_lock; 64 65 CS_MUTEX_LOCK clientlist_lock; … … 108 109 " \\___/|____/ \\___\\__,_|_| |_| |_|\n\n"); 109 110 printf("OSCam cardserver v%s, build #%s (%s)\n", CS_VERSION, CS_SVN_VERSION, CS_TARGET); 110 printf("Copyright (C) 2009-201 2OSCam developers.\n");111 printf("Copyright (C) 2009-2013 OSCam developers.\n"); 111 112 printf("This program is distributed under GPLv3.\n"); 112 113 printf("OSCam is based on Streamboard mp-cardserver v0.9d written by dukat\n"); … … 442 443 void cs_accounts_chk(void) 443 444 { 444 struct s_auth *old_accounts = cfg.account;445 struct s_auth *account1,*account2; 445 446 struct s_auth *new_accounts = init_userdb(); 446 struct s_auth *account1,*account2; 447 cs_writelock(&config_lock); 448 struct s_auth *old_accounts = cfg.account; 447 449 for (account1=cfg.account; account1; account1=account1->next) { 448 450 for (account2=new_accounts; account2; account2=account2->next) { … … 465 467 init_free_userdb(old_accounts); 466 468 ac_clear(); 469 cs_writeunlock(&config_lock); 467 470 } 468 471 … … 4141 4144 init_first_client(); 4142 4145 cs_lock_create(&system_lock, 5, "system_lock"); 4146 cs_lock_create(&config_lock, 10, "config_lock"); 4143 4147 cs_lock_create(&gethostbyname_lock, 10, "gethostbyname_lock"); 4144 4148 cs_lock_create(&clientlist_lock, 5, "clientlist_lock");
Note:
See TracChangeset
for help on using the changeset viewer.