Exemplo n.º 1
0
static void cmd_record(struct http_channel *c)
{
    struct http_session *s = locate_session(c);
    if (s) {
        show_record(c, s);
        release_session(c,s);
    }
}
Exemplo n.º 2
0
static void cmd_record_ready(void *data)
{
    struct http_channel *c = (struct http_channel *) data;
    struct http_session *s = locate_session(c);
    if (s) {
        yaz_log(c->http_sessions->log_level, "Session %u: record watch released", s->session_id);
        show_record(c, s);
        release_session(c,s);
    }
}
Exemplo n.º 3
0
void Engine::show_record(USN_RECORD * record)
{
	void * buffer;
	MFT_ENUM_DATA mft_enum_data;
	DWORD bytecount = 1;
	USN_RECORD * parent_record;

	WCHAR * filename;
	WCHAR * filenameend;
	
	printf("RecordLength: %u\n", record->RecordLength);
	printf("MajorVersion: %u\n", (DWORD)record->MajorVersion);
	printf("MinorVersion: %u\n", (DWORD)record->MinorVersion);
	printf("FileReferenceNumber: %lu\n", record->FileReferenceNumber);
	printf("ParentFRN: %lu\n", record->ParentFileReferenceNumber);
	printf("USN: %lu\n", record->Usn);
	printf("Timestamp: %lu\n", record->TimeStamp);
	printf("Reason: %u\n", record->Reason);
	printf("SourceInfo: %u\n", record->SourceInfo);
	printf("SecurityId: %u\n", record->SecurityId);
	printf("FileAttributes: %x\n", record->FileAttributes);
	printf("FileNameLength: %u\n", (DWORD)record->FileNameLength);

	filename = (WCHAR *)(((BYTE *)record) + record->FileNameOffset);
	filenameend = (WCHAR *)(((BYTE *)record) + record->FileNameOffset + record->FileNameLength);

	printf("FileName: %.*ls\n", filenameend - filename, filename);

	buffer = VirtualAlloc(NULL, BUFFER_SIZE, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);

	if (buffer == NULL)
	{
		return;
	}

	mft_enum_data.StartFileReferenceNumber = record->ParentFileReferenceNumber;
	mft_enum_data.LowUsn = 0;
	mft_enum_data.HighUsn = maxusn;

	if (!DeviceIoControl(drive, FSCTL_ENUM_USN_DATA, &mft_enum_data, sizeof(mft_enum_data), buffer, BUFFER_SIZE, &bytecount, NULL))
	{
		return;
	}

	parent_record = (USN_RECORD *)((USN *)buffer + 1);

	if (parent_record->FileReferenceNumber != record->ParentFileReferenceNumber)
	{
		return;
	}

	show_record(parent_record);
}
Exemplo n.º 4
0
redraw()
{
    /* erase warning line if necessary */
    if ((warntimer <= udcounter) && (warncount > 0)) {
	W_ClearArea(warnw, 5, 5, W_Textwidth * warncount, W_Textheight, backColor);
	warncount = 0;
    }

    if (W_FastClear) {
	W_ClearWindow(w);
	clearcount=0;
	clearlcount=0;
    } else {
	/* TSH 2/10/93 */
	while (clearcount) {
	    clearcount--;
	    W_CacheClearArea(w, clearzone[0][clearcount], 
		clearzone[1][clearcount],
		clearzone[2][clearcount], clearzone[3][clearcount]);
	}
	while (clearlcount) {
	    clearlcount--;
	    W_CacheLine(w, clearline[0][clearlcount], clearline[1][clearlcount],
		clearline[2][clearlcount], clearline[3][clearlcount],
		backColor);
	}
	W_FlushClearAreaCache(w);
	W_FlushLineCaches(w);

	while (mclearlcount){
	    mclearlcount--;
	    W_CacheLine(mapw, mclearline[0][mclearlcount], 
		mclearline[1][mclearlcount], mclearline[2][mclearlcount], 
		mclearline[3][mclearlcount],
		backColor);
	}
	while (mclearpcount){
	    mclearpcount--;
	    W_CachePoint(mapw, mclearpoint[0][mclearpcount], 
		mclearpoint[1][mclearpcount], backColor);
	}
	W_FlushLineCaches(mapw);
	W_FlushPointCaches(mapw);
    }

    local();	/* redraw local window */

    if (mapmode) map();

    if (W_IsMapped(statwin)){
	updateStats();
    }

    /* need a status line but we'll make do with the bottom of the local
       display for now */
    if(runclock)
       run_clock(1);	/* isae */
    if(record)
      show_record(1);
    if(playback)
      show_playback(1);

    if(playback && extracting)
       show_extracting(extracting); /* 7/27/93 BM */

    /* W_Flush(); */
}