×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    5

    setsockopt permission denied

    Hi,

    Code:
    CAPABILITY NetworkServices
    SYSTEMINCLUDE \epoc32\include\stdapis // open C
    LIBRARY libc.lib // open C
    
    int fd, status;
    fd = socket(AF_INET, SOCK_DGRAM, 0); // Works OK
    			
    int reuse = 1;
    int size = sizeof(reuse);
    status = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&reuse, size);
    In the emulator this works fine (status == 0).
    But when I do this in the device the setsockopt fails (status ==-1) and the errno is 13 permission denied!

    I have tried with more capabilities but no help there. Epocwind.out doesn't show any platsec warnings either. What am I missing?

    Thanks!

  2. #2
    Registered User
    Join Date
    Oct 2007
    Posts
    5

    Re: setsockopt permission denied

    I found out that the problem was actually in my N95(!) (also discussed in this link)
    So I tried the code on N80 and it worked! But now on N80 I get a permission denied error 13 on the following
    Code:
    sendto(fd, (char *)s, n, 0, (struct sockaddr *) &sockaddr, sizeof(sockaddr));
    Doesn't anyone know where these errors come from?

Similar Threads

  1. Installing GW - mws-gw-db.cfg permission denied
    By moleyj in forum Mobile Web Server
    Replies: 2
    Last Post: 2007-10-25, 14:26
  2. Replies: 0
    Last Post: 2007-09-20, 03:04
  3. Permission denied
    By manugarrote in forum Symbian
    Replies: 4
    Last Post: 2007-05-29, 23:25
  4. Permission Denied
    By saiful_nokia in forum Symbian
    Replies: 1
    Last Post: 2007-01-17, 08:21
  5. Permission Denied When Call
    By saiful_nokia in forum Symbian
    Replies: 1
    Last Post: 2007-01-17, 08:18

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •