Revision c73e3f22

View differences:

chunker_player/chunker_player.c
109 109
	QueueFillingMode=1;
110 110
	LogTraces = 0;
111 111

  
112
#ifdef PSNR_PUBLICATION
113
	repoclient=NULL;
114
	LastTimeRepoPublish.tv_sec=0;
115
	LastTimeRepoPublish.tv_usec=0;
116
	eventbase = event_base_new();
117
	napaInitLog(LOG_DEBUG, NULL, NULL);
118
	repInit("");
119
#endif
120 112
	
121 113
#ifndef __WIN32__
122 114
	static pid_t fork_pid = -1;
......
238 230
		exit(2);
239 231
	}
240 232
#endif
233
#ifdef PSNR_PUBLICATION
234
	repoclient=NULL;
235
	LastTimeRepoPublish.tv_sec=0;
236
	LastTimeRepoPublish.tv_usec=0;
237
	eventbase = event_base_new();
238
	napaInitLog(LOG_DEBUG, NULL, NULL);
239
	repInit("");
240
#endif
241 241

  
242 242
	if(SilentMode == 0)
243 243
	{
......
617 617
	if(SilentMode != 3) //mode 3 is without P2P peer process
618 618
	{
619 619

  
620
#ifndef __WIN32__
620 621
		char* parameters_vector[255];
621 622
		parameters_vector[0] = argv0;
622 623

  
......
628 629
		while (pch != NULL)
629 630
		{
630 631
			if(par_count > 255) break;
631
			// printf ("\tpch=%s\n",pch);
632
			parameters_vector[par_count] = (char*) malloc(sizeof(char)*(strlen(pch)+1));
633
			strcpy(parameters_vector[par_count], pch);
632
			//printf ("\tpch=%s\n",pch);
633
			parameters_vector[par_count] = strdup(pch);
634 634
			// Find repo_address
635 635
			CheckForRepoAddress(parameters_vector[par_count]);
636 636
			pch = strtok (NULL, " ");
......
638 638
		}
639 639
		parameters_vector[par_count] = NULL;
640 640

  
641
#ifndef __WIN32__
642 641
		int d;
643 642
		int stdoutS, stderrS;
644 643
		FILE* stream;
......
668 667
		dup2(stderrS, STDERR_FILENO);
669 668

  
670 669
		fclose(stream);
670
		for(i=1; i<par_count; i++)
671
			free(parameters_vector[i]);
672

  
671 673
#else
672 674
		STARTUPINFO sti;
673 675
		SECURITY_ATTRIBUTES sats = { 0 };
674
		DWORD writ, excode, read, available;
675 676
		int ret = 0;
676 677

  
677 678
		//set SECURITY_ATTRIBUTES struct fields
......
702 703
		}
703 704
#endif
704 705

  
705
		for(i=1; i<par_count; i++)
706
			free(parameters_vector[i]);
707 706
	}
708 707

  
709 708
#ifdef RESTORE_SCREEN_ON_ZAPPING

Also available in: Unified diff