Search Results

Search found 2 results on 1 pages for 'inga'.

Page 1/1 | 1 

  • Problem reading in file written with xdr using c

    - by Inga
    I am using Ubuntu 10.4 and have two (long) C programs, one that writes a file using XDR, and one that uses this file as input. However, the second program does not manage to read in the written file. Everything looks perfectly fine, it just does not work. More spesifically it fails at the last line added here with the error message xdr_string(), which indicates that it can not read in the first line of the input file. I do no see any obvious errors. The input file is written out, have a content and I can see the right strings using stings -a -n 2 "inputfile". Anyone have any idea what is going wrong? Relevant parts of program 1 (writer): /** * create compressed XDR output stream */ output_file=open_write_pipe(output_filename); xdrstdio_create(&xdrs, output_file, XDR_ENCODE); /** * print material name */ if( xdr_string(&xdrs, &name, _POSIX_NAME_MAX) == FALSE ) xdr_err("xdr_string()"); Relevant parts of program 2 (reader): /** * open data file */ input_file=open_data_file(input_filename, "r"); if( input_file == NULL ){ ERROR(input_filename); exit(EXIT_FAILURE); } /** * create input XDR stream */ xdrstdio_create(&xdrs, input_file, XDR_DECODE); /** * read material name */ if(xdr_string(&xdrs, &name, _POSIX_NAME_MAX) == FALSE) XDR_ERR("xdr_string()");

    Read the article

  • dig @my-server-ip mydomain.com works from inside, not from outside?

    - by x4954
    My server has 2 ips: x.x.x.73 and x.x.x.248. I can access my site via these ips, using Web browser. {Now, from a CentOS machine (not my server), using terminal} If I: dig @x.x.x.73 mydomain.com dig @x.x.x.248 mydomain.com I get the result: Connection timed out; no server could be reached. Could somebody please tell me how to fix it? Thank you. More information: If I log in to my server using ssh and do: dig @x.x.x.73 mydomain.com dig @x.x.x.248 mydomain.com I can see my zone shown as expected: ; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5_7.1 <<>> @x.x.x.73 mydomain.com ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12757 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2 ;; QUESTION SECTION: ;mydomain.com. IN A ;; ANSWER SECTION: mydomain.com. 38400 IN A x.x.x.73 mydomain.com. 38400 IN A x.x.x.248 ;; AUTHORITY SECTION: mydomain.com. 38400 IN NS ns2.mydomain.com. mydomain.com. 38400 IN NS ns1.mydomain.com. ;; ADDITIONAL SECTION: ns1.mydomain.com. 38400 IN A x.x.x.73 ns2.mydomain.com. 38400 IN A x.x.x.248 ;; Query time: 20 msec ;; SERVER: x.x.x.73#53(x.x.x.73) ;; WHEN: Sun Jan 15 11:46:30 2012 ;; MSG SIZE rcvd: 129 BIND version 9.3.6, Centos 5. Logging to my server using ssh, do inga "dig google.com" also shows expected results.

    Read the article

1