Lines 497-512
Link Here
|
497 |
{ |
497 |
{ |
498 |
OSecurity &rSecurity = Security::get(); |
498 |
OSecurity &rSecurity = Security::get(); |
499 |
// Try to create pipe |
499 |
// Try to create pipe |
500 |
if ( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Create, rSecurity )) |
500 |
if( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Open, rSecurity )) // Creation not successfull, now we try to connect |
501 |
{ |
501 |
{ |
|
|
502 |
//Test if launched in another terminal session for same user. |
503 |
vos::OPipe maSessionPipe; |
504 |
if ( maSessionPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Create, rSecurity )) { |
505 |
//Can create pipe with same name. It is in a session user. |
506 |
return IPC_STATUS_MULTI_TS_ERROR; |
507 |
} else { |
508 |
// Pipe connected to first office |
509 |
nPipeMode = PIPEMODE_CONNECTED; |
510 |
} |
511 |
|
512 |
} |
513 |
else if ( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Create, rSecurity )) |
514 |
{ |
502 |
// Pipe created |
515 |
// Pipe created |
503 |
nPipeMode = PIPEMODE_CREATED; |
516 |
nPipeMode = PIPEMODE_CREATED; |
504 |
} |
517 |
} |
505 |
else if( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Open, rSecurity )) // Creation not successfull, now we try to connect |
|
|
506 |
{ |
507 |
// Pipe connected to first office |
508 |
nPipeMode = PIPEMODE_CONNECTED; |
509 |
} |
510 |
else |
518 |
else |
511 |
{ |
519 |
{ |
512 |
OPipe::TPipeError eReason = pThread->maPipe.getError(); |
520 |
OPipe::TPipeError eReason = pThread->maPipe.getError(); |